Most viewed questions in Selenium

0 votes
1 answer

Downloading and Saving a file to a desired location using Selenium Webdriver

You can set the default download location ...READ MORE

Apr 13, 2018 in Selenium by Meci Matt
• 9,460 points
30,420 views
0 votes
1 answer

How to run multiple test cases using TestNG Test Suite in Selenium?

Hi Neerja, to run multiple test cases ...READ MORE

May 22, 2019 in Selenium by Abha
• 28,140 points
30,265 views
0 votes
1 answer

Can we use Selenium to work with an already open browser session?

Yup its possible. Instead of a new ...READ MORE

Apr 24, 2018 in Selenium by king_kenny
• 3,710 points
29,707 views
+2 votes
4 answers

sendKeys() not working in Selenium Webdriver

this work for me you should update your ...READ MORE

Aug 27, 2019 in Selenium by Afif
29,455 views
0 votes
1 answer

Selecting xpath for with multiple conditions using Selenium and Python

Use the XPath in either of the following ways ...READ MORE

Jul 13, 2018 in Selenium by Samarpit
• 5,910 points
28,920 views
0 votes
3 answers

Click Allow on Show Notifications popup using Selenium Webdriver

Try this: Robot robot = new Robot(); robot.delay(5000); robot.keyPress(KeyEvent.VK_TAB); robot.keyPress(KeyEvent.VK_ENTER); hope this ...READ MORE

Mar 1, 2020 in Selenium by anuj
28,686 views
0 votes
1 answer

Select item from sub-menu of a menu using mouse over action in selenium

import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; public ...READ MORE

May 22, 2019 in Selenium by Anvi
• 14,150 points
28,609 views
0 votes
1 answer

What are the differences between POM and PageFactory in Selenium Webdriver?

Hi Raveena, Page Object Model (POM) and ...READ MORE

Jul 17, 2019 in Selenium by Anvi
• 14,150 points
28,500 views
0 votes
1 answer

Using gettext() method for the specific element using Selenium WebDriver

Mistake is that u r printing the ...READ MORE

Apr 10, 2018 in Selenium by Vardy
• 2,360 points
28,441 views
+2 votes
3 answers

How can we handle authentication popup in Selenium WebDriver using Java

1) By passing user credentials in URL. String ...READ MORE

Aug 31, 2020 in Selenium by Sri
• 3,190 points
28,399 views
+1 vote
1 answer

How to get the HTML source of a webpage using Selenium in Java?

There is a method called getPageSource() in ...READ MORE

Jan 11, 2019 in Selenium by Sneha
28,386 views
+3 votes
1 answer

How to get the attribute value of a web element in Selenium (using Java or Python)?

Hello @Umesh, if you want to get ...READ MORE

May 16, 2019 in Selenium by David
28,331 views
0 votes
1 answer

Getting runtime.cucumberexception for error parsing feature file

First check if there is any extra ...READ MORE

May 17, 2019 in Selenium by Frankie
• 9,830 points
27,394 views
+1 vote
1 answer

getting error in testng java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap

A NoClassDefFoundError is thrown when the JRE can't find ...READ MORE

Jun 4, 2020 in Selenium by Ramesh
• 140 points
27,281 views
0 votes
2 answers

What is the difference between / and // in xpath?

/ - Selects from the root node // ...READ MORE

May 29, 2019 in Selenium by anonymous
27,098 views
+1 vote
2 answers

Is it possible to manually set the attribute value of a Web Element using Selenium?

WebDriver driver; JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("document.getElementById('id123').setAttribute('attr', ...READ MORE

Sep 4, 2020 in Selenium by Sri
• 3,190 points
26,720 views
+2 votes
2 answers

How can I press ENTER key with the execute_script in selenium python?

The below code containing Keys.ENTER might just ...READ MORE

Mar 28, 2018 in Selenium by nsv999
• 5,500 points
26,644 views
0 votes
1 answer

How do you automatically download a Pdf with Selenium Webdriver in Python.

Try this code, from selenium import webdriver download_dir = ...READ MORE

Mar 5, 2020 in Selenium by Sirajul
• 59,230 points
26,528 views
0 votes
1 answer

How to use a specific chrome profile in selenium?

User profiling is the term used for ...READ MORE

Dec 24, 2018 in Selenium by Shuvodip
26,104 views
0 votes
1 answer

How do I get current URL in Selenium Webdriver using Python?

Use current_url element. Example: print browser.current_url READ MORE

Aug 8, 2018 in Selenium by Meci Matt
• 9,460 points
25,643 views
+1 vote
2 answers

Is it possible to scroll down in a webpage using selenium webdriver programmed on python?

I using next code for facebook for ...READ MORE

May 16, 2019 in Selenium by mslavikas@gmail.com
25,578 views
0 votes
2 answers

How to get the text from a website using selenium?

driver.findElement(By.cssSelector("p")).getText() or  IWebElement element = Browser.GetElementByCssSelector("div.loginbox p"); string text = ...READ MORE

Sep 6, 2020 in Selenium by Sri
• 3,190 points
25,113 views
0 votes
1 answer

What is soft assert and hard assert?

Soft Assert: Soft Assert collects errors during ...READ MORE

Dec 31, 2018 in Selenium by Stranger
24,825 views
0 votes
1 answer

To check that the web page is loaded or not using Selenium Web Driver?

The solution is using Implicit Wait which ...READ MORE

May 24, 2018 in Selenium by Meci Matt
• 9,460 points
24,783 views
+1 vote
1 answer

How can Selenium select each div separately that have the same class

Hi Surya, you have already got the ...READ MORE

Mar 14, 2019 in Selenium by Vaishnavi
• 1,180 points
24,360 views
0 votes
4 answers

Throwing error - org.openqa.selenium.SessionNotCreatedException: session not created exception

Updating the chrome driver and chrome browser ...READ MORE

Apr 12, 2020 in Selenium by Vamsi
24,302 views
0 votes
1 answer

I am getting error: Element should have been “select” but was “input” using Selenium Webdriver Java

You can Select element by the following ...READ MORE

Jun 27, 2018 in Selenium by Samarpit
• 5,910 points
23,621 views
0 votes
2 answers

Unable to Click on an Element in Selenium (Python) even after finding it.

Here, I give you working script which ...READ MORE

Sep 19, 2018 in Selenium by Priyaj
• 58,090 points
23,446 views
+2 votes
1 answer

How to search for a keyword in google using selenium Java?

You can use locators to find the ...READ MORE

Dec 17, 2018 in Selenium by Nabarupa
23,159 views
0 votes
1 answer

How to open chrome default profile with selenium?

Try the following code. System.setProperty("webdriver.chrome.driver","C:\\chromedriver.exe"); ChromeOptions options = new ...READ MORE

Aug 12, 2020 in Selenium by Sirajul
• 59,230 points
22,955 views
+1 vote
1 answer

Avoid bot detection not working with Selenium

Looks like the website is protected by Bot Management service ...READ MORE

Jul 28, 2020 in Selenium by Kim
22,528 views
+1 vote
1 answer

How can I capture network traffic of a specific page using Selenium?

Hey, to capture network network traffic of ...READ MORE

Jul 19, 2019 in Selenium by Abha
• 28,140 points
22,455 views
0 votes
1 answer

Getting a text of elements in div tag having same class name

Basically,there is no need to retrieve element ...READ MORE

May 17, 2018 in Selenium by Samarpit
• 5,910 points
22,388 views
0 votes
1 answer

How to open new tab in same browser and switch between them using Selenium?

Hi Mugdha, you can use following code ...READ MORE

May 24, 2019 in Selenium by Abha
• 28,140 points
22,017 views
0 votes
1 answer

How can I manually set proxy settings in Python Selenium?

Hi Jyotsana, you can manually set proxy ...READ MORE

Jul 29, 2019 in Selenium by Abha
• 28,140 points
21,999 views
0 votes
2 answers

" Can't connect to any repository" While pushing to github.

Hey, @Boopathy, Go to Window -> Preferences -> Team ...READ MORE

Dec 24, 2020 in Selenium by Gitika
• 65,910 points
21,713 views
+1 vote
2 answers

I want the screenshot of only a specific element and not the entire page. Is it possible with Selenium Webdriver?

Hey @kappa3010, you can try this. Though ...READ MORE

Dec 31, 2018 in Selenium by Priyaj
• 58,090 points
21,292 views
0 votes
1 answer

How to download and add Log4j Jars to Eclipse for Selenium Webdriver?

Hi Diksha, you can follow these steps ...READ MORE

May 22, 2019 in Selenium by Sanjay
20,951 views
0 votes
1 answer

Is there any way to load an extension in chrome browser using Selenium Webdriver?

Hey Harsha, you can load an extension ...READ MORE

Jun 4, 2019 in Selenium by Rishabh
20,564 views
0 votes
1 answer

How to get next sibling element using XPath and Selenium for Java?

Below code will help you: Try following-sibling axis : WebElement ...READ MORE

May 15, 2018 in Selenium by Samarpit
• 5,910 points
20,311 views
0 votes
1 answer

How to refresh a webpage using python selenium webdriver?

Hey Shaurya, the code snippet below shows ...READ MORE

Jul 29, 2019 in Selenium by Anvi
• 14,150 points
20,310 views
0 votes
1 answer

Selenium-Python , find out when a download has completed

There is no built-in to selenium way ...READ MORE

Sep 5, 2018 in Selenium by Meci Matt
• 9,460 points

edited Feb 7, 2020 by Gitika 20,099 views
0 votes
1 answer

How to use Chropath for locating web element in selenium?

Hey Angad, you can follow these steps ...READ MORE

Aug 22, 2019 in Selenium by Abha
• 28,140 points
20,075 views
0 votes
1 answer

How to scroll up/down a page using Actions class in Selenium?

Hi Naetik, you can use Actions class ...READ MORE

Jul 5, 2019 in Selenium by Anvi
• 14,150 points
19,914 views
–1 vote
1 answer

Selenium XPath error:- Element not found

The reason for Element not found exception ...READ MORE

Mar 27, 2018 in Selenium by nsv999
• 5,500 points
19,796 views
0 votes
2 answers

What is Cucumber dry run?

Dry Run is nothing  but checking the ...READ MORE

Nov 8, 2019 in Selenium by Venkata
• 160 points
19,425 views
0 votes
3 answers

java.lang.IllegalStateException Error after adding set property webdriver

/* System.setProperty("WebDriver.gecko.driver", "C:\\Users\\DELL\\Desktop\\GeckoDriver1\\geckodriver.exe"); WebDriver driver = new FirefoxDriver(); */ ...READ MORE

May 1, 2019 in Selenium by anonymous
19,406 views
0 votes
1 answer

How should I configure the chromedriver.exe in eclipse

Use the page factory pattern, working example: public ...READ MORE

Mar 27, 2018 in Selenium by ffdfd
• 5,550 points
19,160 views
0 votes
1 answer

What is Base class in Selenium and how it works?

Hey Prashant, in Selenium Base class is the main ...READ MORE

Jul 18, 2019 in Selenium by Abha
• 28,140 points
19,087 views
+1 vote
2 answers

How can I delete an element in Selenium using Python?

You can directly delete the node using ...READ MORE

Sep 14, 2019 in Selenium by tonystark
• 500 points
18,830 views