[英]how to handle javascript pop up :seems like an alert window redirecting towards a url :having form fields
Consider the following scenario: I need to click on the link name "testing" (name field) which it opens a window (confusion is what type of window it is, as there are no maximize, minimize options) 考虑以下情形:我需要单击链接名称“测试” (名称字段),它会打开一个窗口(混淆是什么类型的窗口,因为没有最大化,所以最小化了选项)
driver.getwindowhandle()
. driver.getwindowhandle()
捕获。 In current scenario of my code: after I click on the "testing" link, the driver gets lost somewhere. 在我的代码的当前情况下:单击“测试”链接后,驱动程序会迷失在某个地方。 Output of
system.out.println(driver);
输出
system.out.println(driver);
does not get printed until I close the window. 关闭窗口后,才能打印。
I applied thread.sleep(timeseconds)
, but again, no response. 我应用
thread.sleep(timeseconds)
,但同样,没有响应。
What is the type of this window: containing text fields? 此窗口的类型是什么:包含文本字段? How to get into it?
如何进入呢?
Step 1: Main Page 步骤1:首页
Step 2: (click on "testing" link => Loading... ) 步骤2 :(点击“测试”链接=> 正在加载... )
Step 3: (once loaded, new window appears) 步骤3 :(一旦加载,就会出现新窗口)
Step 4: Here is the code: it returns no response after clicking on the link. 步骤4:这是代码:单击链接后,它不返回任何响应。 It does not catch the window using handle.
它不使用手柄抓住窗口。 New window page load takes hardly 4 seconds.
新窗口页面加载几乎不需要4秒。
Step 4: source code of pop up window -- seems like a frame 步骤4:弹出窗口的源代码-看起来像一个框架
这不是一个窗口,而是一个框架,您必须使用其ID或名称切换到框架,然后进入其中并执行操作,然后切换到DefaultContent()以从框架切换回
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.