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>
How to use starts-with() in xpath to switch to frame using Selenium
Can anyone help me understand how i use the following java code in python and selenium: I tried using string formatting and couldnt find a way of using starts-with() in python. Answer starts-with() is a xpath function used for finding the web element whose attribute value gets changed on refresh or by other dynamic operations on the webpage. It should
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
Select value by text from a dynamic non select dropdown using Selenium Java
I want to select value by text from a dynamic non select dropdown. I did some research and I found this code: Basically it put the dropdowns options into a List element, and run through in a for loop, and if the options contains text, click it and break the loop. However it is not working with this type of
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
Update empty XML element using XPATH and DOM in Java
I have the following XML document stored as a String and want to update the SubID element that is empty using XPATH and DOM. I’m using the following code to fetch the node first using xpath and update it using DOM. As the XML document use namespaces I’m using local-name() in the xpath. After setting the value in the destination