Pages

Sunday, 20 September 2015

Commonly Used Selenium Commands

Commonly Used Selenium Commands

DAY 2

list of the commonly used commands

open

Opens an URL in the test frame. This accepts both relative and absolute URLs.
The "open" command waits for the page to load before proceeding, i.e. the "AndWait" suffix is implicit.
Note: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy).
If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain.
This is used to navigate to a specific Page or URL

verifyLocation

Verifies that we have navigated to a particular URL. This can be used in a step such as

Then I will navigate to Target Page

type

The target is the CSS selector for the element
The value is the value you wish to enter in the input field.
Sets the value of an input field, as though you typed it in.

click

Clicks on a link, button, checkbox or radio button.
If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.


clickAndWait

Clicks on a link, button, checkbox or radio button and waits for the page to load


check

Checks a radio button or checkbox


verifyVisible

Returns true if the specified element is visible, false otherwise
Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none",either for the element itself or one if its ancestors. This method will fail if the element is not present.


verifyNotVisible

Returns true if the specified element is not visible, false otherwise.
The element must be present in the HTML document but not visible.

verifyElementPresent

Verifies that the specified element is somewhere on the page even if it is not visible.

verifyElementNotPresent

Verifies that the element is not present any where in the HTML document.







No comments:

Post a Comment