SeasideSt / Parasol

Testing web apps in Smalltalk using Selenium WebDriver.
MIT License
31 stars 16 forks source link

POST /session/56...73/keys did not match a known command #1

Closed jgfoster closed 7 years ago

jgfoster commented 7 years ago

Pharo5.0 (Latest update: #50761)

Metacello new baseline: 'Parasol'; repository: 'github://SeasideSt/Parasol/repository'; load: 'tests'.

Parasol-Convenience (ThomasCleenewerck.16) Parasol-Core (JohanBrichau.62) Parasol-Pharo (JohanBrichau.13) Parasol-Tests (JohanBrichau.34)

BPMiscTestCase debug: #'testPlatformIs'.

POST /session/56...73/keys did not match a known command Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' System info: host: '...', ip: '...', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_111' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, firefoxOptions={args=[], profile=...=}, appBuildId=20161129173726, version=50.0.2, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=2648, browserVersion=50.0.2, platformVersion=6.1, XULappId={...}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt}] Session ID: 56...73

I see this command in https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol but not in https://www.w3.org/TR/webdriver/. Perhaps we should use https://www.w3.org/TR/webdriver/#element-send-keys.

Rinzwind commented 7 years ago

Hi James, thanks for posting our very first issue! Three caveats I should point out:

I did a quick check using selenium-server-standalone-3.0.1.jar and chromedriver_mac64.zip (v2.25): when overriding #desiredDriverBrowserCapabilities to use #chrome rather than #firefox, BPMiscTestCase debug: #testPlatformIs still seems to run fine.

I was able to reproduce the issue with “POST /session/{sessionid}/keys” not working when sticking to #firefox. As far as I understand from reading the changelog for Selenium, there might be an issue with Firefox’s new geckodriver having already adopted the new W3C WebDriver spec, which is still in draft:

v3.0.0
======

IMPORTANT CHANGES

* Firefox is only fully supported at version 47.0.1 or earlier. Support
  for later versions of firefox is provided by geckodriver, which is
  based on the evolving W3C WebDriver spec, and uses the wire protocol
  in that spec, which is liable to change without notice.

I’m not sure yet what the implications of the above note are with respect to the use of Firefox in the Parasol tests. For now, you may want to try using Chrome (while perhaps also sticking to selenium-server-standalone-2.53.1.jar).

Rinzwind commented 7 years ago

I am closing this issue. I have changed Parasol's self-tests to use Chrome to avoid the problems with Firefox. I have also dropped the use of Firefox as a default in BPWebDriverTestCase>>desiredDriverBrowserCapabilities and changed that to a #subclassResponsibility.

If anyone needs to be able to use Parasol with Firefox, it seems best that they stick to Firefox version 47.0.1 for now (there’s a branch “last-firefox” in the repository which has the last version of Parasol in which the self-tests use Firefox, it was tested in build #55 on Travis).