SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Next line of code is not executing after click() is performed. #8847

Closed vishwa85 closed 6 years ago

vishwa85 commented 6 years ago

DO NOT LOG AN ISSUE HERE. THIS IS AN ARCHIVE ONLY

Log new selenium issues here:

Hi,

I have written code, where I have 3 level of windows. that means parent -> child1 -> child2. I am able to open child2 window, now i have to perform some action on it. But after the window is opened next line of code is not executing. Control does not come to the next line of code. Kindly assist, its something really urgent and blocking me to proceed.

WebDriver driver = new FirefoxDriver(); driver.manage().window().maximize(); driver.get("application URL"); driver.findElement(By.id("txtUserDefault")).sendKeys("UN"); driver.findElement(By.id("txtPassDefault")).sendKeys("pwd"); driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);

/ To Open first child window / driver.findElement(By.id("cph_ctPortfolioSearch_txtFilter")).click(); driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);

/*   To Switch control to first child window */

Set set1 = driver.getWindowHandles(); Iterator win1 = set1.iterator(); System.out.println(set1); String parent = win1.next(); String child = win1.next(); driver.switchTo().window(child);

    /* To Open second child window */

driver.findElement(By.id("imgAddAssignTo")).click(); ------- After this function the control is not coming to the nextline. I tried all the possible way, but since the control itself doen not go to next line, i am not able to proceed.

   /* To switch to second child window */   

Set set2 = driver.getWindowHandles(); Iterator win2 = set2.iterator(); System.out.println(set2); String parent1 = win2.next(); String child1 = win2.next(); String child2 = win2.next(); driver.switchTo().window(child2);

https://github.com/seleniumhq/selenium/issues/new

This issue will be closed immediately without any comment if you log it here. You will also receive animosity from project members for your willful disregard of this notice.