aerokube / moon

Browser automation solution for Kubernetes and Openshift supporting Selenium, Playwright, Puppeteer and Cypress
http://aerokube.com/moon/latest
Apache License 2.0
224 stars 20 forks source link

Selectors causing org.openqa.selenium.UnsupportedCommandException? #62

Closed anthonybaldwin closed 6 years ago

anthonybaldwin commented 6 years ago

Seeing an issue with what appears to be some of our CSS selectors. Any idea?

Related to this possibly? https://github.com/aerokube/ggr/issues/89

Oct 06, 2018 3:36:16 PM org.openqa.selenium.support.ui.ExpectedConditions findElement
WARNING: WebDriverException thrown by findElement(By.cssSelector: input[name='firstname'])
org.openqa.selenium.UnsupportedCommandException: Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jenkins.aws', ip: '172.31.41.13', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.5.2.el7.x86_64', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.42.591071 (0b695ff80972cc..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:39412}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 69.0.3497.100, webStorageEnabled: true}
Session ID: chrome-69-0-94584060-984d-4195-8796-afe351ba89b0
*** Element info: {Using=css selector, value=input[name='firstname']}
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:582)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:349)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(RemoteWebDriver.java:420)
    at org.openqa.selenium.By$ByCssSelector.findElements(By.java:441)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:310)
    at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:183)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:180)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:260)
    at com.xxx.app.tools.SeleniumPart.el(SeleniumPart.java:618)
    at com.xxx.app.pages.Order_Form.enterFirstName(Order_Form.java:96)
    at com.xxx.app.tests.Production_Form.submits(Production_Form.java:34)
    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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1129)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    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)
org.openqa.selenium.UnsupportedCommandException: Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jenkins.aws', ip: '172.31.41.13', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.5.2.el7.x86_64', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.42.591071 (0b695ff80972cc..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:36888}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 69.0.3497.100, webStorageEnabled: true}
Session ID: chrome-69-0-b0383b25-35d0-4a47-9a5d-15f3f68fdd91
*** Element info: {Using=css selector, value=.chrome-action-bar-search-input input}
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:582)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:349)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(RemoteWebDriver.java:420)
    at org.openqa.selenium.By$ByCssSelector.findElements(By.java:441)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:310)
    at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:183)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:180)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:260)
    at com.xxx.app.tools.SeleniumPart.el(SeleniumPart.java:618)
    at com.xxx.app.parts.FormSearch.clickSearchButton(FormSearch.java:29)
    at com.xxx.app.parts.FormSearch.find(FormSearch.java:42)
    at com.xxx.app.pages.Contact_ListAll.findContact(Contact_ListAll.java:139)
    at com.xxx.app.pages.Contact_ListAll.contactExists(Contact_ListAll.java:149)
    at com.xxx.app.tests.Production_Login.canSeeContact(Production_Login.java:30)
    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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1129)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    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)
vania-pooh commented 6 years ago

@anthonybaldwin is it reproducing with any browsers or some particular browser, e.g. Firefox? Will try to reproduce.

anthonybaldwin commented 6 years ago

@vania-pooh Thanks. I've confirmed with Chrome 67-69, and Firefox 62 so far. Let me know what additional information may help if you have trouble reproducing.

Oct 07, 2018 11:53:36 AM org.openqa.selenium.support.ui.ExpectedConditions findElement
WARNING: WebDriverException thrown by findElement(By.cssSelector: input[name='firstname'])
org.openqa.selenium.json.JsonException: Expected to read a START_MAP but instead have: END. Last 0 characters read: 
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jenkins.aws', ip: '172.31.41.13', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.5.2.el7.x86_64', java.version: '1.8.0_151'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:289)
    at org.openqa.selenium.json.JsonInput.beginObject(JsonInput.java:219)
    at org.openqa.selenium.json.MapCoercer.lambda$apply$1(MapCoercer.java:64)
    at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:142)
    at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:123)
    at org.openqa.selenium.json.Json.toType(Json.java:60)
    at org.openqa.selenium.json.Json.toType(Json.java:50)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:87)
    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:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:349)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(RemoteWebDriver.java:420)
    at org.openqa.selenium.By$ByCssSelector.findElements(By.java:441)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:310)
    at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:183)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:180)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:260)
    at com.xxx.app.tools.SeleniumPart.el(SeleniumPart.java:618)
    at com.xxx.app.pages.Order_Form.enterFirstName(Order_Form.java:96)
    at com.xxx.app.tests.Production_Form.submits(Production_Form.java:34)
    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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1129)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    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)
Oct 07, 2018 11:53:35 AM org.openqa.selenium.support.ui.ExpectedConditions findElement
WARNING: WebDriverException thrown by findElement(By.cssSelector: .chrome-action-bar-search-input input)
org.openqa.selenium.json.JsonException: Expected to read a START_MAP but instead have: END. Last 0 characters read: 
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'jenkins.aws', ip: '172.31.41.13', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.5.2.el7.x86_64', java.version: '1.8.0_151'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:289)
    at org.openqa.selenium.json.JsonInput.beginObject(JsonInput.java:219)
    at org.openqa.selenium.json.MapCoercer.lambda$apply$1(MapCoercer.java:64)
    at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:142)
    at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:123)
    at org.openqa.selenium.json.Json.toType(Json.java:60)
    at org.openqa.selenium.json.Json.toType(Json.java:50)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:87)
    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:548)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:349)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(RemoteWebDriver.java:420)
    at org.openqa.selenium.By$ByCssSelector.findElements(By.java:441)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:310)
    at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:183)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:180)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:260)
    at com.xxx.app.tools.SeleniumPart.el(SeleniumPart.java:618)
    at com.xxx.app.parts.FormSearch.clickSearchButton(FormSearch.java:29)
    at com.xxx.app.parts.FormSearch.find(FormSearch.java:42)
    at com.xxx.app.pages.Contact_ListAll.findContact(Contact_ListAll.java:139)
    at com.xxx.app.pages.Contact_ListAll.contactExists(Contact_ListAll.java:149)
    at com.xxx.app.tests.Production_Login.canSeeContact(Production_Login.java:30)
    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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1129)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    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)
vania-pooh commented 6 years ago

@anthonybaldwin could you please provide your Selenium client version?

anthonybaldwin commented 6 years ago

@vania-pooh 3.14.0

vania-pooh commented 6 years ago

@anthonybaldwin ok, let me try to reproduce this.

vania-pooh commented 6 years ago

@anthonybaldwin can not reproduce with the following example test: https://github.com/aerokube/demo-tests/blob/master/src/test/java/com/aerokube/selenoid/DemoTest.java Using exactly the same Selenium client 3.14.0. Is it simple to check whether these demo tests works for you (it's a Maven project)?

anthonybaldwin commented 6 years ago

I'll give this a try ASAP.

anthonybaldwin commented 6 years ago

Hmm. DemoTest.java works fine. It only happens sometimes, so I'll dive in further to see if I can figure it out, then report back.

vania-pooh commented 6 years ago

@anthonybaldwin any more information on this issue?

vania-pooh commented 6 years ago

@anthonybaldwin closing because of inactivity. Feel free to reopen if still reproducing.