GEB is starting the browser with the zoom of 150%

42 views
Skip to first unread message

tsparks

unread,
Jul 26, 2018, 11:44:46 AM7/26/18
to Geb User Mailing List

GEB is starting the browser ( internet explorer) with the zoom of 150% (i.e. I have no control over it). Anyone know what’s causing this?

Marcin Erdmann

unread,
Aug 1, 2018, 4:58:26 AM8/1/18
to Geb User Mailing List
I'm almost certain that this has nothing to do with Geb.

Quick googling seems to reveal that the zoom level IE starts with is not controlled by Selenium but by a registry setting. One example of stackoverflow answer with regards to this is: https://stackoverflow.com/a/20622330/1856764. I'd suspect that some setting somewhere on your machine makes the zoom to be 150% when the browser starts and if you'd run the same code on a different machine the zoom could be different.

Marcin

On Thu, Jul 26, 2018 at 4:44 PM, tsparks <smmcon...@gmail.com> wrote:

GEB is starting the browser ( internet explorer) with the zoom of 150% (i.e. I have no control over it). Anyone know what’s causing this?

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/a95dec6b-2766-4052-b8cd-dd40d233f961%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tsparks

unread,
Aug 1, 2018, 8:14:32 AM8/1/18
to geb-...@googlegroups.com
Hi Marcin,


I asked this question because some of my tests were failing to find a control which would need a page scroll.
But then the next day when i ran them again (without changing any code) - they were able to find the control and my tests passed.

I saw your name in the Book of Geb hence below questions -  
 We are trying to use GEB with SPOCK framework and some things that have troubled us with GEB are -
1) No Debugging support in IDE
2) Inconsistency - EXAMPLE : There are two tests - Both are running on the same page with a SAVE Button. One test passes and another fails  complaining "It can't find the SAVE button

Any thoughts or help on this?

Thanks,
Shweta






Marcin Erdmann

unread,
Aug 1, 2018, 6:02:14 PM8/1/18
to Geb User Mailing List
Shweta,

You would need to define what exactly you mean by "finding a control"(finding or clicking?) and "tests were failing" (with what/how?) but I never observed elements not being in the viewport having any influence on a selector matching or not matching DOM elements when using Geb/WebDriver. So I'd challenge the statement you made.

I'd also like to challange your statement that Geb does not support debugging in the IDE. There is nothing in Geb that would explicitly prevent that and I personally put breakpoints in code which uses Geb in IntelliJ all the time and debug it without any problems. So, in my opinion there has to be something with your setup that prevents you from debugging. I could try to help if you provided more information about what exactly doesn't work for you with regards to debugging, which IDE you're using and if you could shed some more light on your setup in general apart from the fact that you are using Geb with Spock.

With regards to inconsistency, from experience I can tell that it's usually down to imperfect tests and false assumptions than down to problems with either Geb or WebDriver. The fact that you are observing different behaviour on the same page doesn't mean much - the page could be in a different state, e.g. parts of the page could be hidden, readonly or overlaid which could potentially influence what seems like inconsistent behaviour. Also, I have a feeling the "Save" button is actually found but cannot be clicked. Unfortunately, because you are not sharing stacktraces and describe your issues in very general terms without going into details of what they actually are I have to guess and I'm not really able to help you. 

If you would like us to help you then please ensure that you provide details of what is happening, include stacktraces and try not to interpret what you're seeing.

Cheers,
Marcin

Reply all
Reply to author
Forward
0 new messages