Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DialogShortcutIT::twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted is flaky #10487

Closed
mshabarov opened this issue Mar 30, 2021 · 0 comments · Fixed by #12830

Comments

@mshabarov
Copy link
Contributor

DialogShortcutIT::twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted fails in Flow 6.0 OSGi validation (felix-jetty container):

https://bender.vaadin.com/viewLog.html?buildId=221510&buildTypeId=Flow_Flow60_AddOns_OSGi60Snapshot

[11:19:22]	[Step 6/9] com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT
[11:19:22]	[com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT] dialogWithShortcutListenOnAndPreserveOnRefresh_refreshWhenDialogOpened_shortcutScopingWorks[ANY_Chrome_]
[11:19:22]	[com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT] dialogOpenedWithShortcutNoListenOn_sameShortcutListeningOnUi_bothExecuted[ANY_Chrome_]
[11:19:22]	[com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT] dialogOpenedWithListenOnShortcut_sameShortcutListeningOnUi_focusDecidesWhichIsExecuted[ANY_Chrome_]
[11:19:22]	[com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT] shortcutAddedWithAllowDefault_inputFocused_allKeysAcceptedToInput[ANY_Chrome_]
[11:19:22]	[com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT] twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_]
[11:19:22]	[twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_]] [Test Error Output]
Mar 30, 2021 8:16:53 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Mar 30, 2021 8:16:56 AM com.vaadin.testbench.ScreenshotOnFailureRule failed
INFO: Error screenshot written to: /opt/agent/work/7ae290ae7d22f50c/test-containers/felix-jetty/error-screenshots/twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_](com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT).png
Mar 30, 2021 8:16:59 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Mar 30, 2021 8:17:11 AM com.vaadin.testbench.ScreenshotOnFailureRule failed
INFO: Error screenshot written to: /opt/agent/work/7ae290ae7d22f50c/test-containers/felix-jetty/error-screenshots/twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_](com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT).png
[11:19:22]	[twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_]] java.lang.RuntimeException: twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_](com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT): run failed 2 times
[11:19:22]	[twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_]] java.lang.RuntimeException: twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted[ANY_Chrome_](com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT): run failed 2 times
	at com.vaadin.testbench.RetryRule$1.evaluate(RetryRule.java:69)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:410)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for presence of element located by: By.id: overlay2 (tried for 10 second(s) with 500 milliseconds interval)
	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
	at com.vaadin.testbench.TestBenchTestCase.waitUntil(TestBenchTestCase.java:223)
	at com.vaadin.testbench.TestBenchTestCase.waitUntil(TestBenchTestCase.java:247)
	at com.vaadin.flow.testutil.TestBenchHelpers.waitForElementPresent(TestBenchHelpers.java:136)
	at com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT.waitForTransport(ComplexDialogShortcutIT.java:41)
	at com.vaadin.flow.uitest.ui.ComplexDialogShortcutIT.openNewDialog(ComplexDialogShortcutIT.java:36)
	at com.vaadin.flow.uitest.ui.DialogShortcutIT.twoDialogsOpenedWithSameShortcutKeyOnListenOn_dialogWithFocusExecuted(DialogShortcutIT.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at com.vaadin.testbench.parallel.ParallelRunner$TBMethod.invokeExplosively(ParallelRunner.java:494)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at com.vaadin.testbench.parallel.ParallelRunner$1.evaluate(ParallelRunner.java:468)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at com.vaadin.testbench.RetryRule$1.evaluate(RetryRule.java:59)
	... 12 more
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#overlay2"}
  (Session info: headless chrome=89.0.4389.82)
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'ip-172-16-1-42.eu-west-1.compute.internal', ip: '172.16.1.42', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.123-111.109.amzn2.x86_64', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 89.0.4389.82, chrome: {chromedriverVersion: 89.0.4389.23 (61b08ee2c5002..., userDataDir: /tmp/.com.google.Chrome.Qbit1W}, goog:chromeOptions: {debuggerAddress: localhost:35279}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true, webdriver.remote.sessionid: 0dc78818ac6e3883b3f2806cc3e...}
Session ID: 0dc78818ac6e3883b3f2806cc3e03bd9
*** Element info: {Using=id, value=overlay2}
	at sun.reflect.GeneratedConstructorAccessor22.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
	at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:372)
	at org.openqa.selenium.By$ById.findElement(By.java:188)
	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
	at com.vaadin.testbench.TestBenchDriverProxy.findElement(TestBenchDriverProxy.java:54)
	at com.vaadin.testbench.TestBenchDriverProxy_$$_jvsta58_0._d6findElement(TestBenchDriverProxy_$$_jvsta58_0.java)
	at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.testbench.DriverInvocationHandler.invoke(DriverInvocationHandler.java:51)
	at com.vaadin.testbench.TestBenchDriverProxy_$$_jvsta58_0.findElement(TestBenchDriverProxy_$$_jvsta58_0.java)
	at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:182)
	at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:179)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
	... 32 more

image

mshabarov added a commit that referenced this issue Mar 30, 2021
pleku pushed a commit that referenced this issue Mar 30, 2021
vaadin-bot pushed a commit that referenced this issue Mar 30, 2021
mshabarov added a commit that referenced this issue Mar 30, 2021
mcollovati added a commit that referenced this issue Jan 25, 2022
…rom list

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
mcollovati added a commit that referenced this issue Jan 26, 2022
…rom list

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
joheriks pushed a commit that referenced this issue Jan 26, 2022
…ing assertions (#12830)

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
vaadin-bot pushed a commit that referenced this issue Jan 26, 2022
…ing assertions (#12830)

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
vaadin-bot pushed a commit that referenced this issue Jan 26, 2022
…ing assertions (#12830)

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
joheriks pushed a commit that referenced this issue Jan 26, 2022
…ing assertions (#12830)

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
joheriks pushed a commit that referenced this issue Jan 26, 2022
…ing assertions (#12830)

Sometimes findElements(By.tagNvame("div")) seems to return results
before server roundtrips are completed, so list of elements is missing
elements. Performing a direct searching for child element by xpath
(findElement(By.xpath("div[N]")))) seem always to work.
To be noted that xpath position is 1 based

Fixes #10481, #10487, #10491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant