[英]Python Selenium Find Randomly Generated Element ID
I have looked a few solutions on this issue on stackoverflow. 我已经在stackoverflow上找到了一些有关此问题的解决方案。 Although I cannot seem to find working solution.
虽然我似乎找不到可行的解决方案。
Here is the HTML 这是HTML
<input type="submit" value="New Player Arrived" id="ext-gen1084">
I'm trying to find this element and then return its value with 我试图找到这个元素,然后用
get_attribute('value')
您可以使用以下内容查找随机生成的元素ID:
driver.find_element_by_css_selector("input[type='submit']")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.