Display results as :

Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara


How to get focus to main window after popup window is closed.

View previous topic View next topic Go down

How to get focus to main window after popup window is closed.

Post by bgsraju on Wed Nov 17, 2010 3:56 pm

Hi guys,

I am working on the popup window. I am able to focus on the popup
window and can enter the values in to the text fields and save the
values. After saving the value i am closing the window by clicking the
close button.The main page has to refresh automatically when the popup
window close. But my application is stuck after the popup window is
closed and throwing a warning message.Please go through the code

public void testUntitled() throws Exception {"/Login.aspx");
selenium.type("txtUsername", "Raju");
selenium.type("txtPassword", "Raju");"btnSubmit");
selenium.type("ctl00_txtMemberID", "001620682");"ctl00_btnmasterSearch");
http://selenium.waitForPopUp("form1", "30000");
String[] name = selenium.getAllWindowNames();
int name1 = name.length-1;
System.out.println("WindowName : " +selenium.getAllWindowNames()
http://selenium.selectWindow("Add New Service Note");

selenium.type("ctl09_txtAmount", "100");"ctl09_ddlLedgerStatus", "label=Refund Credited");"ctl09_ddlLedgerStatus", "label=Paid Confirmed");"ctl09_ddlCommission", "label=Commissioned");
selenium.type("ctl09_txtComments", "Commissioned");"ctl09_btnSave");"ctl09_btnClose");


20:41:42.727 INFO - Got result: OK on session
20:41:42.743 INFO - Command request: selectWindow[null, ] on session
20:41:42.759 WARN - Invalid length: Content-Length=21395 written=16384
for http://nextindapp01:9010/Popup.aspx

can you guys please help me how to handle this?

Thanks in advance.



Posts : 3
Join date : 2010-11-17

Back to top Go down

Re: How to get focus to main window after popup window is closed.

Post by SEtech on Thu Nov 18, 2010 1:48 pm

did you try


instead of



Posts : 4
Join date : 2010-04-09

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum