Resizing the window returns before the tab content has reflowed

Fixed, not yet flighted Issue #5185941

Details

Created
Oct 26, 2015
Privacy
This issue is public.
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

When resizing the window, the tab page content hasn’t reflowed by the time to resize command returns.  This means that the user then has to query until after the reflow has happened before they can proceed with the test.

 

Example program:

 

using

System;

using

System.Diagnostics;

using

System.Drawing;

using

System.Threading;

using

OpenQA.Selenium.Edge;

using

OpenQA.Selenium.Chrome;

using

OpenQA.Selenium.Remote;

namespace

SeleniumTest

{

class

Program

{

static

void

Main(

string

[] args)

{

//RemoteWebDriver driver = new ChromeDriver();

RemoteWebDriver

driver =

new

EdgeDriver

();

string

url =

https://www.google.com/?gws_rd=ssl

;

driver.Url = url;

// Wait for the navigation to be complete

while

(driver.Url != url)

{

Thread

.Sleep(100);

}

Random

rnd =

new

Random

();

for

(

int

i = 0; i < 100; i ++)

{

// Retrieve the old size information for comparison after

Size

oldWindowSize = driver.Manage().Window.Size;

string

oldInnerWidth = driver.ExecuteScript(

“return window.innerWidth;”

).ToString();

// Size to the new random size

int

size = rnd.Next(350, 700);

driver.Manage().Window.Size =

new

Size

(size, size);

// This always passes for me

Size

currentSize = driver.Manage().Window.Size;

Debug

.Assert(currentSize.Width == size);

// But this doesn’t pass

string

width = driver.ExecuteScript(

“return window.innerWidth;”

).ToString();

Debug

.Assert(width != oldInnerWidth,

“Width should have changed by now”

);

}

driver.Quit();

}

}

}

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To from “Mara P.” to “Vijeta P.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Vijeta P.” to “Ben B.”

      Changed Assigned To from “Ben B.” to “Sam F.”

      Changed Status from “Confirmed”

      Changed Assigned To from “Sam F.” to “Clay M.”

      Changed Status

      Changed Assigned To from “Clay M.” to “Ben B.”

      Changed Status to “Confirmed”

      Changed Title from “Resizing the window returns before the tab content has reflowed” to “Resizing the window returns before the tab content has reflowed”

      Changed Assigned To from “Ben B.” to “Navin A.”

      Changed Status from “Confirmed” to “In code review”

      Changed Steps to Reproduce

      Changed Steps to Reproduce

      Changed Steps to Reproduce

      Changed Steps to Reproduce

      Changed Steps to Reproduce

      Changed Status from “In code review” to “In progress”

      Changed Steps to Reproduce

      Changed Status from “In progress”

      Changed Status to “In progress”

      Changed Steps to Reproduce

      Changed Status from “In progress” to “In code review”

      Changed Status from “In code review” to “In progress”

      Changed Assigned To from “Navin A.” to “Sam F.”

      Changed Status from “In progress” to “Fixed, not yet flighted”

      Changed Steps to Reproduce

    You need to sign in to your Microsoft account to add a comment.

    Sign in