how to access the $ mark on this Xpath //[@id=”inventory_item_container”]/div/div/div[2]/div[3]/text()[1] ? I’m getting an error on intelij = org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {“method”:”xpath”,”selector”:”//[@id=”cart_contents_container”]/div/div[1]/div[3]/div[2]/div[2]/div/text()[1]”}
(Session info: chrome=126.0.6478.185)
expected for below
actualText = driver.findElement(By.xpath(“//*[@id=”inventory_item_container”]/div/div/div[2]/div[2]”)).getText(); for this actual text should be = $.
Lahimaarie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.