Home > Software design >  org.openqa.selenium.NoSuchElementException when navigating to child div Selenium Java
org.openqa.selenium.NoSuchElementException when navigating to child div Selenium Java

Time:11-21

The current page is

CodePudding user response:

Not sure why you do not want to have XPath.

But in case if you are looking for XPath based on Game name, that can get you it's price. You can use the below XPath

//p[text()='Animal Crossing: New Horizons']//following-sibling::p[@class='price-small']//span[@data-price]

or the below CSS should suffice as well

a[href*='Animal-Crossing-New-Horizons'] > p.price-small > span:nth-child(2)

It is based on href Animal-Crossing-New-Horizons

  • Related