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.
在我的应用程序中,我有一个按钮,如果我点击一个 javascript 弹出窗口,会出现一个文本框来输入任务的名称和一个确定和取消按钮。在自动化过程中,我需要捕获文本框的 xpath 以便输入任务名称。请有人帮我做这件事。
你试过“answerOnNextPrompt”吗?
answerOnNextPrompt(answer) Arguments: answer - the answer to give in response to the prompt pop-up Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()].