Linked Questions
14 questions linked to/from What makes a good selenium locator?
2
votes
7
answers
2k
views
Is element unique ID preferable to use as a Selenium locator than element text? [duplicate]
There is a calculator app calculatoria.com. The task was to create test automation suite for the app. All calculator buttons have unique ids which were used to interact with them.
A button element ...
31
votes
7
answers
20k
views
Is adding IDs to everything standard practice when using Selenium?
My team is using Selenium WebDriver and the QA team is having the developers add IDs to almost everything. Is that normal or is Selenium flexible enough that tests can be written with the markup that ...
5
votes
4
answers
4k
views
How to generate good locators for elements in Web pages?
This site contains many questions that are about finding the right locator expression (XPath, CSS, etc) for an object in WebPage or about troubleshooting problems related in invalid or dynamic ...
7
votes
4
answers
4k
views
same xpath on the page with dynamic ID selenium java
I have a problem with the two same XPath with dynamic ID on the same page. I have tested for selenium in java, when I need to confirm button on delete upload file. Instead of this, test first submits ...
7
votes
1
answer
3k
views
POM vs PageFactory
I'm starting my career as a QA Automation Engineer coming from a Jr dev background. I noticed that there are two main design patterns for Selenium, POM and PageFactory.
Which is the preferred design ...
10
votes
2
answers
849
views
Detecting complicated CSS selectors
This is a follow-up to What makes a good selenium locator?
Motivation
I've been thinking about detecting the complexity of CSS selectors statically.
The scope I'm working in is both test-automation ...
2
votes
2
answers
8k
views
How to use OCR in Selenium to identify dynamic objects
I need to implement OCR (tesseract, Abbyy, MODI, Aprise, etc..) to identify dynamically changing web elements in application page at automation runtime. This way the Selenium webdriver automation ...
1
vote
3
answers
5k
views
Select element by containing text without XPath in Selenium
There is a great discussion on what makes a good Selenium locator here.
It seems many testers prefer CSS to XPath for locators, for various reasons. And that goes for me, too.
But, it is often ...
4
votes
3
answers
369
views
How much does WebDriver code depend on source code
On the login page, the user name, password and login button fields all have id/class name in source code.
So when writing web driver script, if the code gets changed then does the web driver code ...
1
vote
1
answer
4k
views
find_elements_by_xpath issue!
I'm trying to complete the basic python Selenium demo (https://selenium-python.readthedocs.io/getting-started.html) but I'm attempting to do that same procedure on https://www.ncbi.nlm.nih.gov/. ...
0
votes
7
answers
682
views
How to handle changing absolute XPath?
/html/body/div/main/div/div/div[2]/div/div/div/div[1]/div/div***[4]***/div/div[2]
The div[4] element keeps changing. If a new item comes into the web, the div number changes.
How do I handle this?
1
vote
4
answers
712
views
In Automation how can I automatically update web object identifier values (xpath, id, name, etc) as UI changes sprint by sprint?
In Agile methodologies, UI changes rapidly and its very tough to maintain automated regression suite.
Is there any approach, with which we can update it automatically or at least minimize the ...
1
vote
2
answers
598
views
How to reduce Phantom js test execution time for selenium junit test cases
I am using phatnom js driver for my selenium test cases to overcome the headache of chrome driver.I see it is taking lot of time to execute the test cases.I tried html diver prior to phantom.Since ...
0
votes
1
answer
103
views
How to locate any element on browser using location of the element?
I just want to click somewhere on the window. Do we have any method to locate some element or anything on web browser to click on it?
public static void main(String[] args) throws ...