TestStack / TestStack.Seleno

Seleno helps you write automated UI tests in the right way by implementing Page Objects and Page Components and by reading from and writing to web pages using strongly typed view models.
http://teststack.github.com/TestStack.Seleno/
MIT License
180 stars 60 forks source link

Fixed a problem with running IE on a retina screen #194

Open robdmoore opened 9 years ago

robdmoore commented 9 years ago

http://stackoverflowcom/questions/12034969/internetexplorerdriver-zoom-level-error

Also fixed a problem where an error after resolving a driver means the driver and browser didn't get tied to the parent process.

cc @mwhelan

dennisroche commented 9 years ago

This would be great to get merged. I'm having the acceptance tests fail on my Surface Pro 3 as Windows 8 defaults the zoom to 150%.

robdmoore commented 9 years ago

Hmm. I wonder if we can set the zoom level with selenium

On 23 Feb 2015, at 9:31 am, Dennis Roche notifications@github.com wrote:

This would be great to get merged. I'm having the acceptance tests fail on my Surface Pro 3 as Windows 8 defaults the zoom to 150%.

— Reply to this email directly or view it on GitHub.

mwhelan commented 9 years ago

You can use the Action class to zoom in/out with CTRL + and CTRL – . Maybe try CTRL 0 for 100%?

Sent from my iPad

On 23 Feb 2015, at 01:32, Rob Moore notifications@github.com wrote:

Hmm. I wonder if we can set the zoom level with selenium

On 23 Feb 2015, at 9:31 am, Dennis Roche notifications@github.com wrote:

This would be great to get merged. I'm having the acceptance tests fail on my Surface Pro 3 as Windows 8 defaults the zoom to 150%.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

dennisroche commented 9 years ago

Unfortunately cannot use Ctrl + 0 as that defaults to 150%.

ie-no-ctrl

mwhelan commented 9 years ago

From that screenshot it looks like zooming out (Ctrl -) twice will get you to 100%

robdmoore commented 9 years ago

Is there a way to inspect the current zoom level?

On 23 Feb 2015, at 3:43 pm, Michael Whelan notifications@github.com wrote:

From that screenshot it looks like zooming out (Ctrl -) twice will get you to 100%

— Reply to this email directly or view it on GitHub.

mwhelan commented 9 years ago

Sorry, I was on the train and hadn't read the whole thread. If it's just IE then it's a known problem and I think you just have to set IgnoreZoomLevel = true.

    var options = new InternetExplorerOptions
    {
        IntroduceInstabilityByIgnoringProtectedModeSettings = true ,
        IgnoreZoomLevel = true
    };
    return new WebDriverBuilder<InternetExplorerDriver>(() => new InternetExplorerDriver(options))
        .WithFileName("IEDriverServer.exe");       
robdmoore commented 9 years ago

That doesn't fix the problem.

The zoom level would still be wrong and the screenshot will be different. Also, the screenshots are being taken in Firefox I think.

On Mon, Feb 23, 2015 at 4:02 PM, Michael Whelan notifications@github.com wrote:

Sorry, I was on the train and hadn't read the whole thread. If it's just IE then it's a known problem and I think you just have to set IgnoreZoomLevel = true.

var options = new InternetExplorerOptions
{
    IntroduceInstabilityByIgnoringProtectedModeSettings = true ,
    IgnoreZoomLevel = true
};
return new WebDriverBuilder<InternetExplorerDriver>(() => new InternetExplorerDriver(options))
    .WithFileName("IEDriverServer.exe");

— Reply to this email directly or view it on GitHub https://github.com/TestStack/TestStack.Seleno/pull/194#issuecomment-75502654 .