Skip to content

Has to wait for WebWindows to be fully ready?? #132

Closed Answered by GCuser99
GHRyunosuke asked this question in Q&A
Discussion options

You must be logged in to vote

Here is one alternative:

Function GetNewBrowserWindow(oldWindows As WebWindows, driver As WebDriver) As WebWindow
    'need to give the new window some time to be created after click event
    Do While driver.Windows.Count = oldWindows.Count
        driver.Wait 100
        DoEvents
    Loop
    
    '------------------------------------------------------------------------------------------------------
    'I know this goes against the Selenium advice that we can't assume a window order
    'in Windows collection but you may want to test if the last window created is last
    'in the collection - it works for me as an alternative to enumerating the Windows collection:
    
    'Set GetNewB…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GHRyunosuke
Comment options

Answer selected by GHRyunosuke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants