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.

Filter by
Sorted by
Tagged with
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'...
user avatar
  • 34.7k
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 ...
user avatar
  • 7,375
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)
user avatar
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 ...
user avatar
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 ...
user avatar
  • 4,451
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 ...
user avatar
  • 7,788
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> ...
user avatar
  • 8,158
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 ...
user avatar
  • 3,507
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 ...
user avatar
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 ...
user avatar
  • 2,855
278votes
48answers
550kviews

Wait for page load in Selenium

How do you make Selenium 2.0 wait for the page to load?
user avatar
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....
user avatar
  • 2,845
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' (...
user avatar
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?
user avatar
  • 6,775

15 30 50 per page
1
2 3 4 5
6348