Robot class does not work when the selenium suite is executed via a Jenkins job. The same suite however works successfully when executed on local machine.

Need answers for following:

  1. Is there any Jenkins plugin or config changes required for Robot class to work on Jenkins ( basically am I missing anything? )

  2. Is there any approach that can be leveraged for handling "File Upload" dialog that will run successfully when executed via Jenkins job ?

  3. As far as I have searched Robot Class, AutoIt and Sikuli are the 3 approaches for handling Window's dialog popup but which of these is compatible with Jenkins as well ?

  • can you view the test cases runing or it's a headless browser? – Keshav Nov 22 '16 at 4:58
  • I am running via Jenkins job and I can't see them in execution like when I do when running via Eclipse. (so it seems its headless) But when I embedded following script to check if its headless: System.out.println("Is Headless = " + GraphicsEnvironment.isHeadless()); I get following output: Is Headless = false – Sahil Mutreja Nov 22 '16 at 14:40
  • 1
    Yes, it seems to be headless, that's the only reason you cannot see the execution and that the reason for robot commands to not work. There are ways to see the execution on real browser with jenkin. You can only use robot classes on real browsers. – Keshav Nov 23 '16 at 10:12
  • You need to keep the PC/Server unlocked for the file upload dialog to work. – timfredo Dec 15 '16 at 22:11
  • 1
    Keshav is right. Robot framework work with visible area of screen or monitor. Use real system instead of headless browser. – Sagar007 Dec 16 '16 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.