[英]Selenium, Python - Trying to get to click the react-text tag or click the nth occurence of the class it belongs to leads to error 'no element found'
I tried我试过
driver.find_element_by_xpath('//span[@style="Text_in_style"]')
but gives error no such element.但给出错误没有这样的元素。 I know the 'list-group-item report-item' position i want is 13th out of the 20, so can i somehow the 13th class name 'list-group-item report-item'?
我知道我想要的“list-group-item report-item”位置是 20 个中的第 13 个,所以我可以以某种方式使用第 13 个类名称“list-group-item report-item”吗? Thanks!
谢谢!
As you can see both span style's have exactly similar structure below, only except for the span style正如您所看到的,两种 span 样式在下面具有完全相似的结构,只是 span 样式除外
buttons = driver.find_elements_by_xpath('//*[@class="list-group report-group-list"]')
buttons[3].click()
Thanks!谢谢! google
谷歌
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.