1)Element is not currently visible and so may not be interacted with。。。
例如:
运行下面语句会报错,原因是id的元素不唯一,需要更改定位
driver.find_element_by_xpath(//*[@id="oa-file-uploader"]).click()
本文介绍了一个常见的自动化测试中遇到的问题:Elementisnotcurrentlyvisibleandsomemaynotbeinteractedwith,并通过一个实例展示了如何定位不唯一的元素并解决此问题。
1)Element is not currently visible and so may not be interacted with。。。
例如:
运行下面语句会报错,原因是id的元素不唯一,需要更改定位
driver.find_element_by_xpath(//*[@id="oa-file-uploader"]).click()
8845
675
8258

被折叠的 条评论
为什么被折叠?