Monday, 17 December 2012

Selenium Accessors part 1

storeAlert ( variableName )
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts. Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
NOTE: Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
Returns:
The message of the most recent JavaScript alert
Related Assertions, automatically generated:

storeAllButtons ( variableName )
Returns the IDs of all buttons on the page. If a given button has no ID, it will appear as "" in this array.
Returns:
the IDs of all buttons on the page
Related Assertions, automatically generated:

storeAllFields ( variableName )
Returns the IDs of all input fields on the page. If a given field has no ID, it will appear as "" in this array.
Returns:
the IDs of all field on the page
Related Assertions, automatically generated:

storeAllLinks ( variableName )
Returns the IDs of all links on the page. If a given link has no ID, it will appear as "" in this array.
Returns:
the IDs of all links on the page
Related Assertions, automatically generated:

storeAllWindowIds ( variableName )
Returns the IDs of all windows that the browser knows about.
Returns:
the IDs of all windows that the browser knows about.
Related Assertions, automatically generated:

storeAllWindowNames ( variableName )
Returns the names of all windows that the browser knows about.
Returns:
the names of all windows that the browser knows about.
Related Assertions, automatically generated:
  • assertAllWindowNames ( pattern )
  • assertNotAllWindowNames ( pattern )
  • verifyAllWindowNames ( pattern )
  • verifyNotAllWindowNames ( pattern )
  • waitForAllWindowNames ( pattern )
  • waitForNotAllWindowNames ( pattern )

storeAllWindowTitles ( variableName )
Returns the titles of all windows that the browser knows about.
Returns:
the titles of all windows that the browser knows about.
Related Assertions, automatically generated:
  • assertAllWindowTitles ( pattern )
  • assertNotAllWindowTitles ( pattern )
  • verifyAllWindowTitles ( pattern )
  • verifyNotAllWindowTitles ( pattern )
  • waitForAllWindowTitles ( pattern )
  • waitForNotAllWindowTitles ( pattern )

No comments:

Post a Comment