Tuesday 29 October 2013

What are the different methods supported by the selenium web driver in Java?

Selenium web driver supports below methods.

void close()  - Close the current window

WebElement findElement(By by) - Find the first WebElement using the given method.

java.util.List<WebElement> findElements(By by) - Find all elements

void get(java.lang.String url) - Load a new web page.

java.lang.String getCurrentUrl() - Gets  URL the page loaded in the page.

java.lang.String getPageSource() - Get the html source of the page.

java.lang.String getTitle() - gets the title of the current page.

We can call these methods using driver object.


You may also like to read below topics.
  1. Press key in Selenium Webdriver in Java
  2. Read Table Data in Selenium Webdriver in Java
  3. Take the screenshot in Selenium Webdriver in Java
  4. Execute JavaScript in Selenium Webdriver in Java
  5. Handle multiple browser windows in Selenium Webdriver in Java
  6. Double-Click on the Element in Selenium Webdriver in Java
  7. Exceptions in Selenium Webdriver in Java
  8. Synchronization in Selenium Webdriver in Java

What do you think on above selenium topic. Please provide your inputs and comments. Thanks

No comments:

Post a Comment

Buy Best Selenium Books

Contributors