1

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.

Community
  • 1
  • 1
LoveJavaTwo
  • 215
  • 3
  • 17

1 Answers1

2

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.

drets
  • 2,583
  • 2
  • 24
  • 38