Hi you can click India with the following Xpath //*[text()='India']
This is a really helpful resource
I usually open chrome inspector and then hit cntrl+F to open up an interactive way to test my xpaths:
You can target the svgs by using their strokes, but note these may change often. example: //*[@d='M54.5 164.5 L 70.5 164.5 70.5 236.5 54.5 236.5Z' and @stroke="#03a9f4"]
More Related Contents:
- How to click on SVG elements using XPath and Selenium WebDriver through Java
- ElementNotInteractableException: Message: element not interactable error while sending text to Email field on Quora using Selenium with Python
- Creating XPATH for svg tag
- ElementNotInteractableException: Message: element not interactable error sending text in search field using Selenium Python
- Decoding Class names on facebook through Selenium
- How to wait for either of the two elements in the page using selenium xpath
- How to handle dynamically changing ID’s on refresh? [closed]
- Python + Selenium: Wait until element is fully loaded
- StaleElementException when iterating with Python
- Is it possible to switch to an element in a frame without using driver.switchTo().frame(“frameName”) in Selenium Webdriver Java?
- Difference between webdriver.Dispose(), .Close() and .Quit()
- What is the difference between cssSelector & Xpath and which is better with respect to performance for cross browser testing?
- Replace implicit wait with explicit wait (selenium webdriver & java)
- Invalid selector: Compound class names not permitted error using Selenium
- Exception in thread “main” org.openqa.selenium.NoSuchElementException: Unable to locate element: //*[@id=’login-email’]
- selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable with Selenium and Python
- Implicit vs Explicit vs Fluent Wait
- getWindowHandles() not working in firefox 58.The focus remains on parent tab and does not transfer to next tab
- If double slash (//) is used 2 times in XPath, what does it mean?
- Getting all visible text from a webpage using Selenium
- Chrome not reachable Selenium WebDriver error
- “selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element” while clicking a ‘Next’ button with Selenium
- How to click on the anchor element when the spinner obscures it using Selenium and Python?
- What is the use of DesiredCapabilities in Selenium WebDriver?
- org.openqa.selenium.ElementClickInterceptedException: element click intercepted error using Selenium and Java in headless mode
- Java.io.IOException: Invalid Status code=403 text=Forbidden
- How to handle file download popup using Selenium WebDriver?
- How to retrieve the title attribute through Selenium using Python?
- Is string matches() supported in Selenium Webdriver 2?
- Message: stale element reference: element is not attached to the page document in Python