I want to open chrome browser console by pressing keyboard keys Ctrl
+Shift
+j
in selenium webdriver.
I am able to do this action using Robot class but I want this without Robot class. I have used the Actions class and Keys class using sendKeys. But I am unable to open browser console.
Is it chrome browser version issue or OS? Why the browser console is not opening using Action class and Keys class. ?
To open chrome browser console you can use the
ChromeOptions
class with--auto-open-devtools-for-tabs
argument as follows:Test Configuration:
Code Block:
Console Output:
Browser Console Snapshot: