0

I wrote a .NET app that does some automation on a google page using the Chrome Selenium Driver. My app works perfect if I have the Chrome window visible or in the background, but fails if I minimize it. I get a QpenQA.Selenium.ElementNotVisibleException error.

So, all I need is a way for me to start the Google Chrome browser without a minimize box and, if it's possible, almost out of view of the screen. I've solved the out of the bounds of the screen problem by setting :

    cdriver.Manage().Window.Position = new Point(-2000,0);

So the user doesn't see the window now. The problem is that he can still minimize it by clicking on the taskbar icon. Is there a way to prevent minimizing on a specific window or block it from appearing in the taskbar?

kawa
  • 422
  • 4
  • 16
  • have you tried using a `try/catch` block? – Ben May 21 '14 at 04:31
  • Have you tried : `form1.MinimizeBox = false;`? – Shmwel May 21 '14 at 04:33
  • 1
    That will make the minimize button of the main form to disappear. I don't want that . I want the Chrome Browser's minimize button to disappear. there is no MinimizeBox property for that . – kawa May 21 '14 at 04:38
  • What about a `cdriver.Mangae().Window.Size` or something similar? – Ben May 21 '14 at 04:44
  • No use for that. The chrome browser needs to stay with the size that the window starts up with . If I change the size to something smaller then the DOM elements don't get rendered correctly and it fails just as it fails when I minimize it. – kawa May 21 '14 at 04:47

0 Answers0