Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 5574

Used for questions about using Selenium WebDriver, a browser automation framework frequently used to automate testing in a browser.

6 votes
Accepted

Selenium WebDriver faster way to fill textboxes than Sendkeys()

You can do all of that in a single script that you send via executeScript(): JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript( "document.getElementById('elementID1').setAttri …
alecxe's user avatar
  • 11.4k
3 votes

How to get text under <Strong> tag in selenium webdriver using java

The telephone number here is a text node. And, the problem is, you cannot directly target/find text nodes with Selenium WebDriver, only regular element nodes. But, you can though locate the whole p e …
alecxe's user avatar
  • 11.4k
2 votes

Using Selenium (Java),Unable to select a particular value from dropdown

The value of the option is actually string:SINCE. Either use this value or select by visible text: est_date.selectByValue("string:SINCE"); // or est_date.selectByVisibleText("Since ");
alecxe's user avatar
  • 11.4k
2 votes
Accepted

Selecting An Item From A Drop Down List

You can/should utilize the SelectElement class which conveniently abstracts away the "select-option" HTML blocks: var distance = driver.FindElement(By.Id("distance_adv")); var selectDistance = new Se …
alecxe's user avatar
  • 11.4k
4 votes

Type mismatch error

By naming your class WebElement, you are shadowing the imported WebElement. Pick a different name for your class.
alecxe's user avatar
  • 11.4k
3 votes
Accepted

Unresolved attribute reference 'is_selected'

is_selected() is a method available on a WebElement instance which is returned by the driver.find_element_by_*() methods. In your case, I would expect you to have something like this: checkbox_elemen …
alecxe's user avatar
  • 11.4k
1 vote

how to wait until margin size changes

You can always create a custom Expected Condition to track the element location change. Something along these lines: WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); IWebEl …
alecxe's user avatar
  • 11.4k
1 vote

Use selenium webdriver with customized web tags made with web components

There is no need to resolve the results of findElement() command - you can chain the findElement commands one by one: var customtag1 = driver.findElement(webdriver.By.css("customtag1")); var customta …
alecxe's user avatar
  • 11.4k
2 votes

Find anchor (has other html elements) with specific text

Using normalize-space() was a good idea but it would not handle &nbsp; by definition. You can do two things: translate a non-breaking space entity into a regular space compare the full string value …
alecxe's user avatar
  • 11.4k
1 vote
Accepted

Python/Selenium automation email question

Just use the generated value instead of a hardcoded string. Extracting the email generation code into a function would also be a good idea: import string import random def generate_email(prefix='hu …
alecxe's user avatar
  • 11.4k
7 votes
Accepted

Selenium: unable to select drop down option one after another

I am getting below exception: Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document Okay, this one …
alecxe's user avatar
  • 11.4k
4 votes

Element should have been "select" but was "div" error

The problem is that your XPath expression matches a div element while Select class constructor expects a select element. This can be explained by the use of a wildcard * in your XPath expression. Or …
alecxe's user avatar
  • 11.4k
2 votes
Accepted

Selenium Python queston: How to extract the dynamic id generated?

I think you could use the contains() xpath function or the *=, ^=, $= family of CSS selectors to look up the desired element with the partial match on the id attribute and then extract the id attribut …
alecxe's user avatar
  • 11.4k
1 vote

find_elements_by_xpath issue!

First of all, regarding your question about the return types of the "find" commands, it's quite straightforward: find_element_by_*() methods return a WebElement instance - or, in other words, a sing …
alecxe's user avatar
  • 11.4k
3 votes

How to optimize checking that elements are not present with webdriver?

When you call .findElement(By.xpath(...)) on an element, and your expression starts with // - webdriver would actually traverse the whole HTML tree from the very root element. If you want it to be exe …
alecxe's user avatar
  • 11.4k

15 30 50 per page