Hello I just start using selenium with java framework : I have this case : I need to count all the check boxes in my view which contains multiple pages (1,2,3) and in each web page i have a bunch of check boxes with the same xpath with different number see the exemple below: xpath fir the second checkbox in
Tag: xpath
How to get dynamic numbers using xpath?
How do I get dynamically changing numbers in the span block ? Method: I can’t figure out how to do this. My method xpatch which returns the value: How can I get dynamically changing numbers in such blocks for further comparison? Answer byRaetUSD is a webelement you should call getText to get the text or you can call if element
Cannot write dynamic xpath for element in page
This is the Url: http://automationpractice.com/index.php I want to select “casual dresses”, but when I tried the “Women” WebElement is selected instead. How can I write the dyanmic xpath to select “casual dresses”? Answer You have to wait until page is loaded, then hover over Women title, the wait until the menu is open and then click on the Casual Dress
Element not clickable when using FindElement on another WebElement
I have a weird problem: When I locate an element via: WebElement e1 = driver.findElement(By.xpath(“//div1”)); WebElement e2 = e1.findElement(By.xpath(“//.[@class=’c2′]”)); e2.click(…
Find index of nested XML tag
suppose I have an XML like this: foo <name&…
Selenium how to get all elements inside a WebElement
I’m trying to get all the elements inside a selenium WebElement, for example:
Paragraph
</…
How can I use getText to capture text on lines which aren’t tagged?
I have the following web element, which looks like this when inspecting the web page element in the browser:
Your reference is &…
org.openqa.selenium.ElementClickInterceptedException: element click intercepted error using Selenium and Java in headless mode
I have a project that I am working on with java and selenium. the test work OK in UI mode. However in headless mode I get this error how can I resolve this issue (working in UI mode). this is my code why in selenium there is no operation to move to the element and break all layers. this is
Selenium – select an input from an angularjs component
I have an AngularJs component that contains an input of type text. I have used the following code to enter a date. It fails most of the times when I run the test headless. There are a few other inputs before the datepicker that I fill in. But when the test reaches datepciker, it fails because it can not find
Is there a way to convert an element link to XPath
I have written a Jsoup class file to scrape a page and grab the hrefs for every element on the page. What I would like to do from there is to extract the Xpath for each of the elements from their hrefs. Is there a way to do this in JSoup? If not is what is the best way to