【发布时间】:2020-07-07 04:33:32
【问题描述】:
上下文:我必须使用以下规则自动设置时间:配置的时间必须比当前时间长 40 分钟。
字段详情:该字段不可编辑。当我点击该字段时,我按下一个模拟时钟弹出窗口,在我手动选择时间后,该字段开始显示所选时间(规则:我必须选择比当前时间多 40 分钟)
问题:我如何让我的自动化获取当前时间、添加 40 分钟并将此值放入字段中而无需打开弹出窗口?
我试过了,但没用: driver.findElement(By.name("dateSend")).sendKeys("22/07/2020-17:28");
错误:org.openqa.selenium.ElementNotInteractableException:元素不可交互
下面是代码和字段的图片:
Imagem do campo: não editável enter image description here
Código do campo enter image description here
Imagem 弹出窗口 enter image description here
Código 弹出窗口 enter image description here
Campo 'Disparo' após selecioada a hora: enter image description here
Código do campo com horário enter image description here
【问题讨论】:
标签: java selenium-webdriver automation popup