Navigation Menu

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

W3C Protocol expects any of script, pageload, or implicit to be set appium 1.8.1 #233

Closed
rwilliamshgem opened this issue Jun 15, 2018 · 20 comments

Comments

@rwilliamshgem
Copy link

The problem
Just updated appium through npm to the latest version (1.8.1) from 1.7.1 and my automation is failing trying to set the implicit timeout wait.

Environment
Appium version (or git revision) that exhibits the issue: 3.0.0.2
Last Appium version that did not exhibit the issue (if applicable):
Desktop OS/version used to run Appium: 1.8.1
Node.js version (unless using Appium.app|exe): 8.11.0
Mobile platform/version under test: Android 6/ios 11.4
Real device or emulator/simulator: real-device
Appium CLI or Appium.app|exe: appium cli
Details
The exception given out is below:

OpenQA.Selenium.WebDriverException
HResult=0x80131500
Message=Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":30000}
Source=WebDriver
StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteTimeouts.ExecuteSetTimeout(String timeoutType, TimeSpan timeToWait)
at OpenQA.Selenium.Remote.RemoteTimeouts.set_ImplicitWait(TimeSpan value)
at GemApp.ManagerApp.Tests.UI.SpecflowIoC.BeforeScenario() in C:\Projects\GemApp.ManagerApp-NetStandard\GemApp.ManagerApp.Tests.UI\SpecflowIoC.cs:line 46

Link to Appium logs
W3CProtocol.txt

Code To Reproduce Issue [ Good To Have ]
Create a AndroidDriver
followed by line below
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);

@kseeman
Copy link

kseeman commented Jun 28, 2018

I am also seeing this same behavior after upgrading to appium 1.8.1. Has there been any resolution with this?

@skyscarer
Copy link

I'm also seeing this behaviour.

System.InvalidOperationException: 'Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":30000}'

All I did to get this error was to set the following code:
Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);

@ronjonesjr
Copy link

ronjonesjr commented Jul 11, 2018

Ditto here. I converted my code so that I no longer use implicit waits; I now use explicit waits and I like the results better. That said, this still seems like a bug.

@rwilliamshgem
Copy link
Author

@kseeman no resolution that i'm aware of, I'm going to look into using explicit waits instead so that i can use the latest appium verison

@jackwangchs
Copy link

Any updates on this issue? I got the same error on MacOS

  • Appium 1.8.2 beta
  • Appium WebDriver 3.0.0.2
  • Selenium Support 3.12.1
  • Selenium WebDriver 3.12.1

But it works well on my Windows platform, with the same/similar tools version

  • Appium 1.8.1
  • Appium donet driver 3.0.0.2
  • WebDriver 3.12.1
  • WebDriver Support 3.12.1

What makes the difference?

Due to the different, I'm using different wait methods between MacOS and Windows, now I'm going to merge them. And want to use implicitly wait to make it simple. Can anyone help on fixing this issue?

@laolubenson
Copy link
Collaborator

@jackwangchs I believe this is an appium server issue. The remote timeout class is defined in Selenium and selenium project expects the response from a server to be W3C. If it is not, it throws the above error.

@laolubenson
Copy link
Collaborator

@jackwangchs can you try building and running appium server from source? As I can no longer reproduce the error doing so.

@jackwangchs
Copy link

@akinsolb I see java-client has fixed the problem #229, are you sure the dotnet issue from Appium server, instead dotnet client?

@laolubenson
Copy link
Collaborator

laolubenson commented Jul 26, 2018

Very sure. My local repo currently has appium-dotnet-driver (master branch) with selenium v3.13 and I ran tests against appium from source. I just haven’t had the time to find the changeset that resolved the issue. Will look into it further today but give it a try.

@jackwangchs
Copy link

@akinsolb that's okay. I will try with appium server from source. Thanks!

@jackwangchs
Copy link

@akinsolb After building from source, it shows 1.8.0-beta. Is it package.json issue? How to confirm whether installed from the latest source?

@jackwangchs
Copy link

@akinsolb Building appium from source doesn't meet the W3C Protocol issue. But I would want to know if I'm using the latest source, or just using the old version 1.8.0-beta which doesn't have the issue. Thanks!

@laolubenson
Copy link
Collaborator

@jackwangchs I presume after cloning, building and launching appium server from source, running the command 'appium -v' returns "1.8.0-beta"? I believe this is source.

@mykola-mokhnach Can you confirm whether this issue is resolved by appium/appium-base-driver#231? and if so, close the issue?

@jackwangchs
Copy link

@akinsolb yes, the version shows "1.8.0-beta". I found the "version": "1.8.0-beta" in the package.json file

@rwilliamshgem
Copy link
Author

If this is fixed by the beta version when will it be released as I'm having issues getting my iOS automation to use explicit waits and it would make it simpler if i could use implicit waits as my code was before

@theAshenfire
Copy link

I have just encountered the exact same issue on my machine, using server from nuget.
Steps to reproduce:

  1. install appium 1.8.1 (npm install -g appium)
  2. download latest version of appium-dotnet-driver
  3. set up and start an android emulator on my machine with version 4.4.2
  4. start up appium (command: appium -a localhost)
    5.run any test under Appium.Intergration.Test.Android

expected result: test completes successfully
actual result: i get the following error:
OpenQA.Selenium.WebDriverException : Parameters were incorrect. We wanted "W3C protocol expects any of script, pageLoad or implicit to be set" and you sent {"type":"implicit","ms":5000}

i found that when i comment out the following line in test then it passes
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;

please help me resolve this issue

@tomerpeled
Copy link

tomerpeled commented Sep 18, 2018

Any updates - I'm actually using the C# version?

@laolubenson
Copy link
Collaborator

@tomerpeled which appium server version are you using?

@tomerpeled
Copy link

1.8.1

@laolubenson
Copy link
Collaborator

Right, I can only advise that you update to the latest version of appium server, hoping it will handle this issue.
Furthermore, If you are using the .Net bindings with Selenium > v3.8, then this won't be resolved until the next beta release which will support Selenium 3.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants