Reputation: 225
I am using Selenium and Java to write a test. I use the code bellow to open 'Developer Tool' window while my testing is running:
robot = new Robot();
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_J);
robot.keyRelease(KeyEvent.VK_J);
robot.keyRelease(KeyEvent.VK_SHIFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
It opens the window but closes that right after. How can I keep it open?
I read some about it here but I couldn't find my answer.
Upvotes: 1
Views: 122
Reputation: 2795
You can't run WebDriver
with opened DevTools in Google Chrome.
Roughly talking: WebDriver
uses debugger tools for controlling the browser. DevTools are also debugger tools. You can't use both simultaneously.
Upvotes: 2