p:dataTable使用radioButton选择单行和单行选择

时间:2020-06-29 05:11:30

标签: primefaces primefaces-datatable

我使用的是素数,来自此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>

1 个答案:

答案 0 :(得分:1)

开箱即用不起作用,并且有一张有关该问题的PrimeFaces开放票证:

问题https://github.com/primefaces/primefaces/issues/4468

公关https://github.com/primefaces/primefaces/pull/6090

PR将其修复为9.0

相关问题