Issue
I need to know whether or not the current browser under test is firefox running in headless mode. How can I find this information at runtime?
Solution
You can find this information in the Capabilities
of the firefox session under test.
console.log((await driver.getCapabilities()).get("moz:headless"));
This will return a boolean representing whether or not the firefox instance was launched using the -headless
option when the binary object was set up.
Answered By - yurisich
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.