Skip to main content

Working With Windows in Selenium Web Drivers

IN Web Application, it may be possible that once you open the browser then multiple windows open. These windows may have advertisement or other useful information. it may be also possible that once user will click on any link then a new window or new tab will open. So in this article we will handle these multiple windows using Selenium Web Driver.

Here user will need method to handle main window by using getWindowHandle() then we need to handles all other new windows opening by getWindowHandles() method.

getWindowHandle() Return an opaque handle to this window that uniquely identifies it within this driver instance while getWindowHandles() Return a set of window handles which can be used to iterate over all open windows of this WebDriver instance by passing them to switchTo().WebDriver.Options.window()






Comments

Popular posts from this blog

What is API?

In general way, API (Application Programming Interface) is the intermediate software which is useful for two applications to communicate. API is the tool which is used for interaction of two applications. If developer developing any software which have multiple blocks (Modules) than developer use APIs to put them together.

Smoke Testing

In Smoke Testing, Testing team check the key feature or key bugs of the software. Smoke testing ensure that critical functionality of the software is working fine.If key features are not working then it is no needed to test the overall functionality because it is just waste of time. In Smoke Testing, test team check the basic feature of the software and if basic feature is not working it means software is broken very badly and further testing is unnecessary. If Smoke Testing failed then it is declared that build is unstable and revert back to developer team until smoke test is pass.

Structural Testing

Structural Testing is the type of testing in which user should have the knowledge of the code because in this testing user need to check the structure of the system. Structural Testing is White Box Testing.