我在网页上有一个表,它的xpath不时不同,但它的类名不同。所以我可以通过类名来处理它,但是我的代码需要该元素的xpath,那么如何获得该元素的xpath呢?或如何处理这些不同的元素?String xpath = "here sould be the xpath of that element";
wait_page_loading(B
我陷入了一种需要在属性文件中动态编写Xpath的情况。实际的XPath与属性文件div[contains(text(),'<state Name>')]中的类似。状态名称每次都会更改。如何编写从属性文件中获取的动态xpath?下面是存储在属性文件中的Xpath
data=div[contains(text(),'New D
ntfyeu=jo5suw") while driver.find_element_by_xpath("/html/body/main/div/div[2]/div/div[1]/divprint("Item out of stock , waiting for product") driver.find_element_by_xpath