Closed vdelendik closed 4 years ago
Added fluent wait to resize browser method #1142
fixed. no need to test as it is too complicated to repro
reopening issue as such negative use-case detected:
16:10:07 Oct 20, 2020 1:10:06 PM org.openqa.selenium.remote.ProtocolHandshake createSession 16:10:07 INFO: Detected dialect: W3C 16:10:07 2020-10-20 13:10:06 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:07 2020-10-20 13:10:06 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:07 2020-10-20 13:10:06 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:07 2020-10-20 13:10:07 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:07 2020-10-20 13:10:07 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:07 2020-10-20 13:10:07 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:07 2020-10-20 13:10:07 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:08 2020-10-20 13:10:08 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:08 2020-10-20 13:10:08 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:08 2020-10-20 13:10:08 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:08 2020-10-20 13:10:08 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:09 2020-10-20 13:10:09 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:09 2020-10-20 13:10:09 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:09 2020-10-20 13:10:09 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:09 2020-10-20 13:10:09 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:10 2020-10-20 13:10:09 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:10 2020-10-20 13:10:10 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:10 2020-10-20 13:10:10 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:10 2020-10-20 13:10:10 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:10 2020-10-20 13:10:10 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:11 2020-10-20 13:10:11 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:11 2020-10-20 13:10:11 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:11 2020-10-20 13:10:11 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:11 2020-10-20 13:10:11 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:12 2020-10-20 13:10:12 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:12 2020-10-20 13:10:12 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:12 2020-10-20 13:10:12 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:12 2020-10-20 13:10:12 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:13 2020-10-20 13:10:12 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:13 2020-10-20 13:10:13 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:13 2020-10-20 13:10:13 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:13 2020-10-20 13:10:13 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:14 2020-10-20 13:10:13 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:14 2020-10-20 13:10:14 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:14 2020-10-20 13:10:14 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:14 2020-10-20 13:10:14 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:15 2020-10-20 13:10:14 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:15 2020-10-20 13:10:15 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:15 2020-10-20 13:10:15 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:15 2020-10-20 13:10:15 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:16 2020-10-20 13:10:15 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:16 2020-10-20 13:10:16 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:16 2020-10-20 13:10:16 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:16 2020-10-20 13:10:16 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:16 2020-10-20 13:10:16 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:17 2020-10-20 13:10:17 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:17 2020-10-20 13:10:17 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:17 2020-10-20 13:10:17 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:17 2020-10-20 13:10:17 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:18 2020-10-20 13:10:17 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:18 2020-10-20 13:10:18 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:18 2020-10-20 13:10:18 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:18 2020-10-20 13:10:18 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:19 2020-10-20 13:10:18 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:19 2020-10-20 13:10:19 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:19 2020-10-20 13:10:19 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:19 2020-10-20 13:10:19 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:19 2020-10-20 13:10:19 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:20 2020-10-20 13:10:20 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:20 2020-10-20 13:10:20 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:20 2020-10-20 13:10:20 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:21 2020-10-20 13:10:20 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:21 2020-10-20 13:10:21 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:21 2020-10-20 13:10:21 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:21 2020-10-20 13:10:21 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:21 2020-10-20 13:10:21 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:22 2020-10-20 13:10:22 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:22 2020-10-20 13:10:22 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:22 2020-10-20 13:10:22 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:22 2020-10-20 13:10:22 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:23 2020-10-20 13:10:23 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:23 2020-10-20 13:10:23 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:23 2020-10-20 13:10:23 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:23 2020-10-20 13:10:23 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:24 2020-10-20 13:10:23 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:24 2020-10-20 13:10:24 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:24 2020-10-20 13:10:24 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:24 2020-10-20 13:10:24 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:24 2020-10-20 13:10:24 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:25 2020-10-20 13:10:25 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:25 2020-10-20 13:10:25 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:25 2020-10-20 13:10:25 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:25 2020-10-20 13:10:25 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:26 2020-10-20 13:10:26 DesktopFactory [main-1] [ERROR] Resize browser window was not applied! 16:10:26 2020-10-20 13:10:26 DesktopFactory [main-1] [ERROR] Unable to resize browser window 16:10:26 org.openqa.selenium.TimeoutException: Expected condition failed: waiting for com.qaprosoft.carina.core.foundation.webdriver.core.factory.impl.DesktopFactory$1@64eb35bd (tried for 20 second(s) with 5 milliseconds interval) 16:10:26 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' 16:10:26 System info: host: 'jenkins-slave-6tk6t', ip: '100.96.10.9', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-1021-aws', java.version: '1.8.0_242' 16:10:26 Driver info: driver.version: unknown 16:10:26 at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:304) 16:10:26 at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.core.factory.impl.DesktopFactory.resizeBrowserWindow(DesktopFactory.java:177) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.core.factory.impl.DesktopFactory.create(DesktopFactory.java:74) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.core.factory.DriverFactory.create(DriverFactory.java:63) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.createDriver(IDriverPool.java:520) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:164) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:99) 16:10:26 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:87) ... 16:10:26 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:10:26 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 16:10:26 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:10:26 at java.lang.reflect.Method.invoke(Method.java:498) 16:10:26 at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132) 16:10:26 at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599) 16:10:26 at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174) 16:10:26 at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) 16:10:26 at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822) 16:10:26 at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147) 16:10:26 at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) 16:10:26 at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) 16:10:26 at java.util.ArrayList.forEach(ArrayList.java:1257) 16:10:26 at org.testng.TestRunner.privateRun(TestRunner.java:764) 16:10:26 at org.testng.TestRunner.run(TestRunner.java:585) 16:10:26 at org.testng.SuiteRunner.runTest(SuiteRunner.java:384) 16:10:26 at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378) 16:10:26 at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337) 16:10:26 at org.testng.SuiteRunner.run(SuiteRunner.java:286) 16:10:26 at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) 16:10:26 at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) 16:10:26 at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218) 16:10:26 at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) 16:10:26 at org.testng.TestNG.runSuites(TestNG.java:1069) 16:10:26 at org.testng.TestNG.run(TestNG.java:1037) 16:10:26 at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283) 16:10:26 at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) 16:10:26 at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120) 16:10:26 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377) 16:10:26 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138) 16:10:26 at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465) 16:10:26 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
fixed: https://github.com/qaprosoft/carina/pull/1146/files going to test on my own
Reuse fluent waiters for every direct driver call in carina otherwise we can observe below exception like below. Also test returing default implicit timeout to 1 sec for example.
02:42:11 Sep 29, 2020 11:42:11 PM org.openqa.selenium.remote.ProtocolHandshake createSession 02:42:11 INFO: Detected dialect: W3C 02:42:11 2020-09-29 23:42:11 DesktopFactory [TestNG-test=GSM arena web tests-1-18] [ERROR] Unable to resize browser window 02:42:11 org.openqa.selenium.json.JsonException: Unable to determine type from: <. Last 1 characters read: < 02:42:11 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' 02:42:11 System info: host: 'e2ed0a222056', ip: '172.18.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-1025-aws', java.version: '1.8.0_242' 02:42:11 Driver info: driver.version: RemoteWebDriver 02:42:11 at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:122) 02:42:11 at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:140) 02:42:11 at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:126) 02:42:11 at org.openqa.selenium.json.Json.toType(Json.java:69) 02:42:11 at org.openqa.selenium.json.Json.toType(Json.java:55) 02:42:11 at org.openqa.selenium.json.Json.toType(Json.java:50) 02:42:11 at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:87) 02:42:11 at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) 02:42:11 at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.listener.EventFiringSeleniumCommandExecutor.execute(EventFiringSeleniumCommandExecutor.java:48) 02:42:11 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) 02:42:11 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609) 02:42:11 at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:837) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.core.factory.impl.DesktopFactory.resizeBrowserWindow(DesktopFactory.java:238) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.core.factory.impl.DesktopFactory.create(DesktopFactory.java:101) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.core.factory.DriverFactory.create(DriverFactory.java:73) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.createDriver(IDriverPool.java:510) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:161) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:96) 02:42:11 at com.qaprosoft.carina.core.foundation.webdriver.IDriverPool.getDriver(IDriverPool.java:84) 02:42:11 at com.qaprosoft.carina.demo.WebSampleTest.testNewsSearch(WebSampleTest.java:99) 02:42:11 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 02:42:11 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 02:42:11 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 02:42:11 at java.lang.reflect.Method.invoke(Method.java:498) 02:42:11 at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134) 02:42:11 at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:597) 02:42:11 at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173) 02:42:11 at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) 02:42:11 at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:816) 02:42:11 at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146) 02:42:11 at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) 02:42:11 at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) 02:42:11 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 02:42:11 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 02:42:11 at java.lang.Thread.run(Thread.java:748)