这是我的 HTML 按钮的代码:
<button type="submit" class="btn btn-secondary" id="single_button618eda460b64617" title="">Re-attempt quiz</button>
以及我为许多其他组件定义的类,并且id
总是以single_button
.
但结尾是随机字符。它是唯一一个以这个前缀开头的。
我如何使用button=driver.find_element_by_id()
,但首先single_button
?