FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

launchApp command should switch the session to the newly opened window #1130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
launchApp command, when completed successfully, opens a new tab and loads an 
app in it. The number of windows in the webdriver session, as measured by 
len(driver.windows_handles), grows by one. However webdriver session's "current 
window", as indicated by driver.current_window_handle doesn't change even 
though most users will want to work with the newly opened window after sending 
lanuchApp command (and also the new window is also, visually, the active tab).

Expected behavior:
1) one new window opens, existing windows are kept unchanged, 
len(driver.windows_handles) grows by one
2) the new window becomes current, that is driver.current_window_handle returns 
the handle of the newly opened window

Original issue reported on code.google.com by vlotoshn...@gmail.com on 20 Jun 2015 at 12:54

GoogleCodeExporter commented 9 years ago
 vlotoshnikov@

thanks for filing bug.

Expected behavior:
1) one new window opens, existing windows are kept unchanged, 
len(driver.windows_handles) grows by one 
==> this is currently happening driver.getWindowHandles() returns all opened 
window and grows in number if there is any new window opened.

what are you expecting here ?

2) the new window becomes current, that is driver.current_window_handle returns 
the handle of the newly opened window
-- (and also the new window is also, visually, the active tab)==> although the 
new window is visually active tab still you need to switch ChromeDriver focus 
to this newly opened window by some logic then only> 
driver.getWindowHandle()returns the handle of the newly opened window. 

This behavior is across all the drivers (e.g FirefoxDriver...)

Original comment by agau...@chromium.org on 22 Jun 2015 at 11:36

GoogleCodeExporter commented 9 years ago
This issue is only relevant for launching Chrome Apps, so it is a non-standard 
feature that doesn't exist in FirefoxDriver or other browser drivers. Since 
newly launched Chrome App windows automatically become the active window, this 
should also be the case in ChromeDriver.

Original comment by samu...@chromium.org on 22 Jun 2015 at 2:27

GoogleCodeExporter commented 9 years ago
Fixed in https://codereview.chromium.org/1196663005 and will be part of 2.17.

Original comment by samu...@chromium.org on 29 Jun 2015 at 5:50