Following commands are used with "Navigate" function of selenium.
1) to(String
url) :- To open the specified URL.
2) to(URL url) :- To open the specified URL.
3) back() :- To redirect back in the browser history.
4) forward() : - To redirect forward in the
browser history.
5) refresh() :- To refresh the current page.
Following commands are used to manage the browser.
1) get(String
url) :- To open the specified URL.
2) getCurrentUrl() :- To get the URL
of current webpage.
3) getTitle() :- To get the title of the current page.
4) close() :- To close the current window(Tab).
5) quit() :- To close the complete browser.
Following commands are used to search the webelements.
1) findElement(By by) :-
This command will provide first element matching the specified criteria.
2) findElements(By by) :- This
command will provide all elements which are present on webpage
& matching the specified criteria .
Following commands are used to perform manipulation on webelement.
1) click() :- Click on an element.
2) submit() :- Submit a form.
3) sendKeys(CharSequence... keysToSend) :- Send the specified
keys to an element.
4) clear() :- Clear the text from a text field.
No comments:
Post a Comment