简体   繁体   English

单击Tab不同于Java中的Selenium Webdriver SendKeys

[英]Click Tab another way than by Selenium Webdriver SendKeys in Java

I'm working on FF 56 and I can not use older version so I have problems with sendKeys function. 我正在使用FF 56,并且无法使用旧版本,因此sendKeys函数存在问题。 In case of just sending values to element I did it by : 如果只是将值发送到元素,我可以通过以下方式进行操作:

jsexec.executeScript("arguments[0].value='" + value +"';", WebElement_LocatedBySelenium);

but now I need to click TAB or ENTER to reload fields in my form. 但是现在我需要单击TAB或ENTER重新加载表单中的字段。

Any Ideas ? 有任何想法吗 ? Maybe there is some better way than JSexecutror 也许有比JSexecutror更好的方法

Thnx. 谢谢

The question is a little hard to understand. 这个问题有点难以理解。 Do you mean you want to take focus away from the field so the "blur" event can trigger? 您是说要把焦点转移到该领域之外,以便触发“模糊”事件吗?

I do this by locating the body or container element and sending a click to that. 我通过找到主体或容器元素并向其发送点击来实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM