Questions tagged [selenium]
Selenium is a popular open-source tool for automating web browsers. When using this tag, also include other tags for the specific components you are using, e.g. selenium-webdriver for the language bindings, selenium-ide, selenium-grid, etc.
95,210
questions
596votes
18answers
583kviews
Get HTML source of WebElement in Selenium WebDriver using Python
I'm using the Python bindings to run Selenium WebDriver:
from selenium import webdriver
wd = webdriver.Firefox()
I know I can grab a webelement like so:
elem = wd.find_element_by_css_selector('#my-id'...
581votes
37answers
820kviews
Selenium using Python - Geckodriver executable needs to be in PATH
I'm new to programming and started with Python about two months ago and am going over Sweigart's Automate the Boring Stuff with Python text. I'm using IDLE and already installed the Selenium module ...
527votes
47answers
603kviews
How can I take a screenshot with Selenium WebDriver?
Is it possible to take a screenshot using Selenium WebDriver?
(Note: Not Selenium Remote Control)
519votes
23answers
343kviews
Can a website detect when you are using Selenium with chromedriver?
I've been testing out Selenium with Chromedriver and I noticed that some pages can detect that you're using Selenium even though there's no automation at all. Even when I'm just browsing manually just ...
445votes
51answers
605kviews
Debugging "Element is not clickable at point" error
I see this only in Chrome.
The full error message reads:
"org.openqa.selenium.WebDriverException: Element is not clickable at point (411, 675). Other element would receive the click: ..."
The ...
372votes
3answers
81kviews
Headless Browser and scraping - solutions [closed]
I'm trying to put list of possible solutions for browser automatic tests suits and headless browser platforms capable of scraping.
BROWSER TESTING / SCRAPING:
Selenium - polyglot flagship in browser ...
358votes
11answers
476kviews
Is there a way to get element by XPath using JavaScript in Selenium WebDriver?
I am looking for something like:
getElementByXpath(//html[1]/body[1]/div[1]).innerHTML
I need to get the innerHTML of elements using JS (to use that in Selenium WebDriver/Java, since WebDriver can't ...
340votes
12answers
717kviews
How do I find an element that contains specific text in Selenium WebDriver (Python)?
I'm trying to test a complicated JavaScript interface with Selenium (using the Python interface, and across multiple browsers). I have a number of buttons of the form:
<div>My Button</div>
...
312votes
30answers
792kviews
Typing the Enter/Return key in Selenium
I'm looking for a quick way to type the Enter or Return key in Selenium.
Unfortunately, the form I'm trying to test (not my own code, so I can't modify) doesn't have a Submit button. When working with ...
304votes
29answers
638kviews
Error message: "'chromedriver' executable needs to be available in the path"
I am using selenium with python and have downloaded the chromedriver for my windows computer from this site: http://chromedriver.storage.googleapis.com/index.php?path=2.15/
After downloading the ...
283votes
17answers
447kviews
How to select a drop-down menu value with Selenium using Python?
I need to select an element from a drop-down menu.
For example:
<select id="fruits01" class="select" name="fruits">
<option value="0">Choose your fruits:</option>
<option ...
278votes
48answers
550kviews
Wait for page load in Selenium
How do you make Selenium 2.0 wait for the page to load?
271votes
15answers
567kviews
Wait until page is loaded with Selenium WebDriver for Python
I want to scrape all the data of a page implemented by a infinite scroll. The following python code works.
for i in range(100):
driver.execute_script("window.scrollTo(0, document.body....
265votes
37answers
354kviews
WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser
I am trying to launch chrome with an URL, the browser launches and it does nothing after that.
I am seeing the below error after 1 minute:
Unable to open browser with url: 'https://www.google.com' (...
259votes
4answers
92kviews
What would be an alternate to [TearDown] and [SetUp] in MSTest?
When I use MSTest Framework, and copy the code that Selenium IDE generated for me, MSTest doesn't recognize [TearDown] and [SetUp]. What is the alternative to this?