Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Selenium WebDriver 并有一个列表,在我提交时我需要一个元素保持选中状态。
但是当我找到元素并单击它时,焦点会转移到按钮上,因此不再选择项目。有没有解决的办法?
尝试将 Enter 键传递给输入字段:
el.sendKeys(Keys.ENTER);
要不就:
el.submit();
I have the following code:
document.getElementById("launcherDiv").innerHTML = "<object id='launcher' classid='CLSID:17E88883-3488-46B8-BE4D-30568888855' codebase='Helper.CAB#version=8