tag:blogger.com,1999:blog-2663471515965947110.post7305006960032025831..comments2024-03-28T00:29:58.388-07:00Comments on Dealing with Selenium: Selecting Popup window without IdAmit Vibhutihttp://www.blogger.com/profile/13105850596040901527noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-2663471515965947110.post-75734996435901948852011-03-10T15:56:10.689-08:002011-03-10T15:56:10.689-08:00Thank you! The code below works and it really real...Thank you! The code below works and it really really helped me. <br /><br />1) selenium.Click("css=input[id$='_LookupFooterImageButton']");<br />2) String feedWinId = selenium.GetEval("{var windowId; for(var x in selenium.browserbot.openedWindows ) {windowId=x;} }");<br />3) selenium.SelectWindow(feedWinId);<br />4) selenium.WindowFocus();<br />5) selenium.Type("//form[@id='form1']/table//*[@id='SearchTextBox']", "p");Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2663471515965947110.post-77799998739832312442011-01-10T04:50:05.305-08:002011-01-10T04:50:05.305-08:00hy your post realy save me thanks from argentina a...hy your post realy save me thanks from argentina and keep that way ;)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2663471515965947110.post-51381876993301621682010-10-15T03:40:33.199-07:002010-10-15T03:40:33.199-07:00Hi amit,
I have seen your posts and Thx for your ...Hi amit,<br />I have seen your posts and Thx for your posts...<br />I used below code and not working....I am using VS2010 IDE with C# code.<br /><br />1) selenium.Click("css=input[id$='_LookupFooterImageButton']");<br />2) String feedWinId = selenium.GetEval("{var windowId; for(var x in selenium.browserbot.openedWindows ) {windowId=x;} }");<br />3) selenium.SelectWindow(feedWinId);<br />4) selenium.WindowFocus(); <br />5) selenium.Type("//form[@id='form1']/table//*[@id='SearchTextBox']", "p");<br /><br />Here while executing, selenium RemoteRunner executes line 1 which is going to open popup window and after that no response for long time..<br />So I closed that opened popup window manually while executing, Immediately lines 2,3 and 4 are executing....<br />Line 5 is the command to give input on popup window...<br />So whatever lines are there after the line which will open popup window are not executing. Also when i close popup manully, immediately excuting those lines.. so i can't get id or name of popup window to handle...<br /><br />Can u help me on this? How i can pass input to Popup window....<br /><br /><br />Thx in advance,<br />SCSVELShanhttps://www.blogger.com/profile/02229532071115772664noreply@blogger.com