我使用的是素数,来自此python: How can I press arrow keys randomly selenium,没有答案。 是否可以使用RadioButton从一行中选择数据,也可以通过单击该行进行选择? 测试此代码时,它可以工作,但是RadioButton单击不起作用
from selenium.webdriver.common.keys import Keys
import random
import time
moves = [Keys.LEFT, Keys.DOWN, Keys.RIGHT, Keys.UP]
while True:
driver.find_element_by_css_selector('body').send_keys(random.choice(moves))
time.sleep(2)
这样,它只能通过单击RadioButton而不是数据表的行来工作
<p:dataTable id="dato" value="#{aGuiaBean.listUsuario}" var="data"
selectionMode="single" selection="#{aGuiaBean.usuarioSeleccionado}"
rowKey="#{data.idUsuario}" >
<p:column selectionMode="single" />
</p:dataTable>
答案 0 :(得分:1)
开箱即用不起作用,并且有一张有关该问题的PrimeFaces开放票证:
问题:https://github.com/primefaces/primefaces/issues/4468
公关:https://github.com/primefaces/primefaces/pull/6090
PR将其修复为9.0