kailash gaur
kailash gaur

Reputation: 1447

Handle Chrome default pop up through selenium web-driver

I am working on automation test-case through selenium web-driver. I am stuck at one place where I am always getting first chrome'd default pop up. I am not able to do anything with that pop up as it's not inspecting in code, Please check in attached screen shot for default pop-up.

Please suggest me to handle these thing. Any help is appreciated.

chrome default pop up SS

Upvotes: 2

Views: 868

Answers (1)

jyoti gautam
jyoti gautam

Reputation: 11

These are Window based pop up, which is not controlled by selenium so need to use java.awt.Robot class or Autoit tool. Robot class describe as- for example:

    Robot robot = new Robot();
    robot.keyPress(KeyEvent.VK_TAB);
    robot.delay(1000);
    robot.keyPress(KeyEvent.VK_SPACE);
    robot.keyRelease(KeyEvent.VK_SPACE);
    robot.delay(10000);

it takes one key at a time, we can not pass multiple keys at one time. Hope this will solve your problem.

Upvotes: 1

Related Questions