Skip to content

BadParametersError: Parameters were incorrect. We wanted {"required":["value"]} and you sent ["value",":id"] #41

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

Closed
khanhdodang opened this issue Mar 29, 2017 · 2 comments

Comments

@khanhdodang
Copy link

I see the latest version doesn't work with API sendKeys, I tried with several requests as Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, accessibility id. Please see more info below:

Versions:
PHPUnit 5.7.17
Appium version: 1.6.3
iOS device: 10.2 (real device)

Client script:

<?php
class iOSWebTest extends PHPUnit_Framework_TestCase {
  protected $driver;
  public function test_should_search_Google() {
    $desired_caps = array(
      'browserName'         => 'Safari',
      'platformName'        => 'iOS',
      'deviceName'          => 'iPhone 5s',
      'deviceOrientation'   => 'portrait'
    );
    $SERVER_URL = "http://127.0.0.1:4723/wd/hub";
    $this->driver = RemoteWebDriver::create($SERVER_URL, $desired_caps,
    $connection_timeout_in_ms = 300000,
    $request_timeout_in_ms = 300000);
    $this->driver->get("https://www.google.com");
    $this->driver->findElement(WebDriverBy::name("q"))->sendKeys("Google");
    $this->driver->findElement(WebDriverBy::name("btnG"))->click();
    sleep(3);
    $this->assertContains("Google", $this->driver->getTitle());
    $this->driver->quit();
  }
}

Error:

Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["value"]} and you sent ["value",":id"]
@mykola-mokhnach
Copy link

What if you send "Google" as array of characters (use str_split)?

@khanhdodang
Copy link
Author

Hi @mykola-mokhnach I haven't tried it, but the sample scripts can run smoothly before. The idea is I want to enter some texts into a text field like Google Search. In addition, I can run passed on Android real device. Do you have any hints for it?

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

2 participants