简体   繁体   中英

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)

  1. this new window is not caught by driver.getwindowhandle() .
  2. tried as an alert box, but still no response

In current scenario of my code: after I click on the "testing" link, the driver gets lost somewhere. Output of system.out.println(driver); does not get printed until I close the window.

I applied thread.sleep(timeseconds) , but again, no response.

What is the type of this window: containing text fields? How to get into it?

Step 1: Main Page

在此处输入图片说明

Step 2: (click on "testing" link => Loading... )

在此处输入图片说明

Step 3: (once loaded, new window appears)

在此处输入图片说明

Step 4: Here is the code: it returns no response after clicking on the link. It does not catch the window using handle. New window page load takes hardly 4 seconds.

在此处输入图片说明

Step 4: source code of pop up window -- seems like a frame 在此处输入图片说明

这不是一个窗口,而是一个框架,您必须使用其ID或名称切换到框架,然后进入其中并执行操作,然后切换到DefaultContent()以从框架切换回

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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