I am new to selenium automation and while learning radio button handling in selenium, I tried to automate language setting in amazon.in page. I am unable to select the radio button listed in the page. site: https://www.amazon.in/customer-preferences/edit?ie=UTF8&preferencesReturnUrl=%2F&ref_=topnav_lang code used: driver.findElement(By.xpath(“//input[@value = ‘ta_IN’]”)).click(); (I tried to select the language tamil- TA (3rd radio button)). Can anyone guide me in this? Answer
Tag: xpath
How to click on Close icon/element on the Facebook sign-up page using Selenium Java?
I am new to Selenium and learning. On the Facebook sign-up page I want to click on the X as shown in the below screenshot, but I am unable to click it. It’s an img element. Answer The desired element is an <img> tag which is the preceding-sibling of a <div> tag which is the immediate ancestor of the <div>
XPath doesn’t locate element
I want to scrape links from this page. https://www.youtube.com/results?search_query=food+recepies None of these works for me. Answer This should work for the title. However, there are 27 of them. So, you might want to use Another thing is that you might want to wait until the elements are visible, enabled, clickable, etc., on the page. For this, you need to do
Selenium – Find element at other element level
I have following piece of code to read value from one field: In this case I receive an empty string. If I do it in this way with long xpath it reads correct value: So my question is why using findElement at WebElement row doesn’t work. I’d like to do it this way because I need to read more values
Integrating regex in selenium xpath?
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
How to find an element by mobile xpath with Appium matching @text attribute with a regular expression (regex)?
I’m automating Android apps using Selenium-Appium (Java) and I got some difficult to address the following need: I have an element that doesn’t have any of ID or ACCESSIBILITY ID configured. But I’ve noticed that its value is a fixed pattern, a date, like “dd/MM/yyyy”. So, I need “to get element in screen which pattern fits with ‘dd/MM/yyyy’ date pattern”.
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&…