Close windows popup in selenium grid

181 views
Skip to first unread message

satmisha giri

unread,
May 15, 2016, 10:22:08 AM5/15/16
to Selenium Users

Hi ,

 I am using selenium grid in which we are using 1 sever and 3 node .I our project for window based popup i used robot keys but when i run through selenium grid it  does not close window based popup.Is there any way to close    popup in selenium grid?


Thanks

name1 name2

unread,
May 15, 2016, 10:35:37 AM5/15/16
to seleniu...@googlegroups.com

Use Auto it to handle windows popups

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/eb999f42-183f-44cd-9cbf-d85f8df4a3ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

⇜Krishnan Mahadevan⇝

unread,
May 15, 2016, 10:46:41 AM5/15/16
to Selenium Users
@Manohar,
You cannot use AutoIT out of the box in a grid like environment, when your tests are running in a remote machine.

@Giri,
You cannot use Robot (or) AutoIT (or) any other tool for that matter, when it comes to interacting with OS dialog boxes in a Grid environment [ especially when your Node where the test runs is a different machine and your tests are being triggered from a different machine ] out of the box. You would need to build some customizations before you can do it.

Here's how :

1. Build a Servlet that can be injected into the Node which when invoked can trigger a Robot driven action.
2. Hook the servlet into the node and spawn the node.
3. Now start the Grid and run your test.
4. Just before you are supposed to land in the place wherein the OS dialog box appears, fetch the session Id 
5. Using the session Id, now invoke your node servlet which would do the AutoIt/Robot driven action.

PS : For this to be done, you would need to ensure that your Grid can run only 1 concurrent session at a time else your AutoIT/Robot action would be triggered on the wrong browser window.

Some resources that you can refer to, to get this done :

  • How to retrieve the IP and Port of the Node to which my test was routed to, by the Grid : Refer to my blog here.
  • How to customize the Grid. Refer here.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

name1 name2

unread,
May 15, 2016, 11:04:45 AM5/15/16
to seleniu...@googlegroups.com

Thanks Krishna for clear explanation.

Anand

unread,
May 18, 2016, 3:16:05 PM5/18/16
to seleniu...@googlegroups.com
I think you can use Switch to Alert through Selenium grid and i have already closed windows Alert throgh grid. What kind of popup it is, can you send screen shot ?

Always a student

unread,
Nov 10, 2017, 3:32:49 PM11/10/17
to Selenium Users
Hi Krishnan,

Thanks for providing this info. I was wondering if there is any video of this process, or, if there is are any c# specific steps,  could you point them to me?

I am a C# guy and trying to tranlsate this info for use with C# bindings. I am able to execute test cases on grid but just not Autoit commands. 

Thanks very much in advance :)

Krishnan Mahadevan

unread,
Nov 12, 2017, 8:20:26 AM11/12/17
to seleniu...@googlegroups.com

The official uber binary for the Grid is based on Java. So I guess you would need to use Java only here.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

Reply all
Reply to author
Forward
0 new messages