How to configure WebDriver to loose focus of the Web Browser?

56 views
Skip to first unread message

Debanjan Bhattacharjee

unread,
Jan 18, 2018, 9:40:30 AM1/18/18
to webdriver
Hello Everyone,

Normally, while we take screenshot we ensure that the `WebDriver` instance i.e the `driver` have the focus on the `Web Browser`. If the `WebDriver` don't have the focus on the `Web Browser` we have used "JavascriptExecutor" (`Java`) / "IJavascriptExecutor" (`C#`) to regain the browser focus.

My question is, "How to configure the WebDriver to loose focus of the Web Browser?"

Factually, how can I configure/instruct the `WebDriver` instance i.e the `driver` while I invoke `getScreenshotAs()` without the browser focus ?

Any comments/suggestions/pointers are welcome.

Thanks and Regards
Debanjan-B
Reply all
Reply to author
Forward
0 new messages