关于元素定位使用class_name定位报错的部分问题Unable to locate element: {“method“:“css selector“
关于元素定位使用class_name定位报错的部分问题Unable to locate element: {“method“:“css selector“
在使用selenium的定位web元素的时候,有时候会提示找不到定位元素,报错:Message: no such element: Unable to locate element: {“method”:”css selector”,”selector”:”.words”}
发现他找不到你定义的元素,这时候需要你检查一下你的定位元素,修改后重新运行即可,或者通过发现规则加入try:监听后重试
再次执行代码就会发现不再会报错了。
Great post however , I was wondering if you could write a litte more on this subject? I'd be very thankful if you could elaborate a little bit further. Thanks!