What are some of the browser commands used in Selenium Webdriver

0 votes
What are some of the browser commands used in Selenium Webdriver?
May 14, 2019 in Selenium by Nakul
803 views

1 answer to this question.

0 votes

Hi Nakul, some of the most frequently used browser commands in Selenium Webdriver are as follows:

  1. get(String arg0)In WebDriver, this method loads a new web page in the existing browser window. It accepts String as parameter and returns void. For Eg. driver.get("www.facebook.com") 

  2. getCurrentUrl(): In WebDriver, this method fetches the string representing the Current URL of the current web page. It accepts nothing as parameter and returns a String value. For eg. String CurrentUrl = driver.getCurrentUrl()   

  3. getPageSource(): In WebDriver, this method returns the source code of the current web page loaded on the current browser. It accepts nothing as parameter and returns a String value. For eg. String PageSource = driver.getPageSource()

  4. close(): This method terminates the current browser window operating by WebDriver at the current time. If the current window is the only window operating by WebDriver, it terminates the browser as well. This method accepts nothing as parameter and returns void. For eg. driver.close()

  5. quit(): This method terminates all windows operating by WebDriver. It terminates all tabs as well as the browser itself. It accepts nothing as parameter and returns void. For eg. driver.quit()

answered May 14, 2019 by Abha
• 28,140 points

Related Questions In Selenium

0 votes
1 answer

What is Xpath and what are the types of it in Selenium Webdriver?

Hi Piyush, XPath is defined as XML path. It is ...READ MORE

answered May 9, 2019 in Selenium by Pratibha
• 3,690 points
5,372 views
0 votes
1 answer
0 votes
1 answer

What are the different types of TestNG listeners in Selenium Webdriver?

Hello Jagrati, some of the TestNG listeners ...READ MORE

answered Jun 12, 2019 in Selenium by Anvi
• 14,150 points
1,814 views
0 votes
1 answer

What are the commonly used Selenium Webdriver commands to manage cookies?

Hi Nisha, some of the most commonly ...READ MORE

answered Jun 19, 2019 in Selenium by Anvi
• 14,150 points
1,483 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,874 views
0 votes
1 answer

What are some of the most commonly used WebElement commands for Selenium Webdriver?

 Hey Rupali, some of the most commonly ...READ MORE

answered May 14, 2019 in Selenium by Abha
• 28,140 points
1,150 views
0 votes
1 answer

What are the main types of regex quantifiers used in Selenium Webdriver?

Hi Andrew, some of the regex quantifiers ...READ MORE

answered Jun 26, 2019 in Selenium by Abha
• 28,140 points
5,605 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP