Is the first window a guaranteed main window? Or is the order random and inconsistent?
for (String handle : driver.getWindowHandles()) { driver.switchTo().window(handle); }
I cannot find any information about the order of the window descriptors, just a way to repeat them all. I assume that the main window will be the first in the list of window handles.
According to the current WebDriver API Specification :
6.3 Windows IterationgetWindowHandles, . , , . javascript "window.top.closed" ( ) false ., .
6.3 Windows Iteration
getWindowHandles
, . , , . javascript "window.top.closed" ( ) false .
, .
, - .
alece , .
, , , Selenium ( , ), . , , , , , .
"" "" , , . , , - .
Source: https://habr.com/ru/post/1568853/More articles:Cascade in Rebola - metaprogrammingAndroid development models - javaCocoaTouch with resources - ioshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1568851/how-to-avoid-mixedinsecure-content-warnings-when-having-deep-links-to-non-http-schemes-for-mobile-apps&usg=ALkJrhiCp1rheTqDb_fU0B_s2WLBkwAIwQhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1568852/warning-assignment-from-incompatible-pointer-type-enabled-by-default-while-assigning-function-address-to-function-pointer&usg=ALkJrhiB78u3aJvPVx186xqMjAIYolibGQjQuery Offset returns a negative value - jqueryAngularJS route options with any characters - javascriptNSTabView not working in NSAppearanceNamedVibrantDark Popover - cocoaInheriting refactoring to a composition that preserves polymorphic capabilities in C ++ - c ++Why does text_size_body have different sizes in the AppCompat library and Android Lollipop? - androidAll Articles