Home

Awesome

Silk AppDriver

Silk AppDriver is an implementation of the W3C WebDriver protocol for native (Windows) and mobile (Android and iOS) applications, built on top of Silk Test. The purpose of this project is to enable users of Silk Test to write tests for all kinds of applications using the WebDriver API in addition to the existing Silk Test APIs.

Prerequisites

Running

Examples

Here's a minimal example written in Python that automates notepad.exe using Silk AppDriver:

from selenium import webdriver

driver = webdriver.Remote(
  command_executor='http://127.0.0.1:8080',
  desired_capabilities={'app': '%WINDIR%\\notepad.exe'})

textfield = driver.find_element_by_xpath("//TextField")
textfield.clear()
textfield.send_keys("hello from python!")

driver.find_element_by_xpath("//Menu[@caption='File']").click()
driver.find_element_by_xpath("//MenuItem[@caption='Exit']").click()
driver.find_element_by_xpath("//PushButton[@caption=\"Don't Save\"]").click()

driver.quit()

Further examples can be found here:

Building

To build Silk AppDriver on the command line:

To build Silk WebDriver in the IDE:

Architecture

Noteworthy

The controller stub was auto-generated based on the "List of Endpoints" in the WebDriver standard using a simple Silk4J script. That can be found here: appdriver-generate

Current status

Silk AppDriver is still in an early stage and needs your help and contributions to get better!

Locator strategies

Only xpath is currently supported as a locator strategy. Ony "Silk Test xpath" locators will work.

API

The following table lists all methods listed in the W3C spec and the current status of the implementation in Silk AppDriver.

CommandStatusComment
New SessionDone
Delete SessionDone
StatusDone
Get TimeoutsTODO
Set TimeoutsTODO
GoDoneNot supported (yields "unknown command")
Get Current URLDoneNot supported (yields "unknown command")
BackDoneNot supported (yields "unknown command")
ForwardDoneNot supported (yields "unknown command")
RefreshDoneNot supported (yields "unknown command")
Get TitleDone
Get Window HandleDone
Close WindowDone
Switch To WindowDone
Get Window HandlesDone
Switch To FrameDoneNot supported (yields "unknown command")
Switch To Parent FrameDoneNot supported (yields "unknown command")
Get Window RectDone
Set Window RectDone
Maximize WindowDone
Minimize WindowDone
Fullscreen WindowDone
Get Active ElementTODO
Find ElementDone
Find ElementsDone
Find Element From ElementDone
Find Elements From ElementDone
Is Element SelectedTODO
Get Element AttributeTODO
Get Element PropertyDone
Get Element CSS ValueDoneNot supported (yields "unknown command")
Get Element TextDone
Get Element Tag NameDoneYields the class name
Get Element RectDone
Is Element EnabledDone
Element ClickDone
Element ClearDone
Element Send KeysPartly doneMissing: Handling of special keys
Get Page SourceDoneNot supported (yields "unknown command")
Execute ScriptDoneNot supported (yields "unknown command")
Execute Async ScriptDoneNot supported (yields "unknown command")
Get All CookiesDoneNot supported (yields "unknown command")
Get Named CookieDoneNot supported (yields "unknown command")
Add CookieDoneNot supported (yields "unknown command")
Delete CookieDoneNot supported (yields "unknown command")
Delete All CookiesDoneNot supported (yields "unknown command")
Perform ActionsTODO
Release ActionsTODO
Dismiss AlertTODO
Accept AlertTODO
Get Alert TextTODO
Send Alert TextTODO
Take ScreenshotDoneTakes a screenshot of the entire desktop
Take Element ScreenshotDone

TODOs

The biggest TODOs currently are:

License

Code provided in this repository is licensed under the Apache 2.0.

Contribution

You want to contribute to Silk AppDriver? Great!

Changes may be contributed after signing the Micro Focus Individual Contributor License Agreement 1.0. Signed contributor agreements are to be sent, via PDF, to licensing@microfocus.com. You will be notified via email when the agreement has been accepted by Micro Focus.