-
Notifications
You must be signed in to change notification settings - Fork 59
WebDriverJS
WebDriverJS are the Javascript bindings to Selenium.
The original source is here: https://code.google.com/p/selenium/wiki/WebDriverJs and was modified as below:
- Removal of the limitations described here https://code.google.com/p/selenium/wiki/WebDriverJs#Caveats
- It is not necessary to have an existing session in order to use WebDriverJS
- If a session exists it is reused
- If no session exists, then a new one is created
- Handling of the new Cisco Selenium commands
Get the files in the web directory
Cisco WebDriverJS comes with an demo application (WebDriverJsDemo.html) wich can be used to perform manual testing.
The UI includes the following elements:
- WebDriver url and port:
Specifies the IP and port of the WebDriver - Web Page:
Specifies the url to open. Can be empty, see GET - GET:
Requests the WebDriver to open the URL specified in the "Web Page" field.- If "WebPage" is blank:
- If the WebDriver already has a session open then this session will be reused and the "WebPage" field value updated with the WebDriver's current URL
- Otherwise a new session will be created and a new web view created with blank content
- Otherwise ("WebPage" field specifies and URL)
- If the WebDriver already has a session open then this session will be reused and the URL loaded in the current view (web/widget/quick)
- Otherwise a new session will be created and a new web view created with the specified URL content
- If "WebPage" is blank:
- Visualize:
See Remote Vizualizer - Screenshot:
Downloads a screenshot of the current WebDriver window - Logs:
Downloads the specified WebDriver log ("browser", i.e JS console or "driver") - Find by:
Looks up and element by id, name, tagname or xpath.
If found, extra controls are displayed to interact with the element - A Keyboard
- List window handles:
Lists the window handles managed by the current session - Choose window:
Switched the current window to the selected handle. The "WebPage" fiels is updated with the window URL This is useful when dealing with composite UIs (web in widgets, inner frames, etc...) - Set window size:
Resizes the current window - Disable click events:
Click events disabled in Visualizer. See Remote Visualizer - Quit:
Quits the current session - Source: Prints the page source the the text area
Clicking on the "Source" button above will popup a window that mirrors the current window
The interaction on the "visualization" popup will be forwarded to the actual WebDriver window
This can be used to perfrom interactive testing of gestures, mouse movements etc..
The WebDriver command is:
/session/:sessionId/-cisco-visualizer-source |
---|
GET /session/:sessionId/-cisco-visualizer-source |
Get a deep copy of the current page source URL Parameters: :sessionId - ID of the session to route the command toReturns: The current page source. Potential Errors: NoSuchWindow - If the currently selected window has been closed. |
It is also availble through org.openqa.selenium.qtwebkit.QtWebKitDriver.getVisualizerSource()
.
Home | Build And Run | Releases | Features
Copyright © 1992-2016 Cisco and/or its affiliates