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

Filling form or any input element is not clear how to use it #32

Open
saiedtrife opened this issue Oct 17, 2018 · 0 comments
Open

Filling form or any input element is not clear how to use it #32

saiedtrife opened this issue Oct 17, 2018 · 0 comments

Comments

@saiedtrife
Copy link

I am trying to fill form in website using browser on android device, and they problem is there is no clear way to locate the element

  • PHP Version: 7.2
  • Appium Version: latest
  • Codeception Version: 2.4.2

Description:

1-I am trying to open chrome on android device and register form
So far I was able to : 1-Open chrome 2-click on button

$data = array('url'=>"myUrl");
       $I->setUrl($data);
       $I->getUrl();
       $I->implicitWait([ 'ms' => 3500, ]);
       $I->byCssSelector('#container-calculator > form > 
       div.calculator__button.calculator__button--promocode.form-group > a')
         ->click();

But when it came to sendkeys (filling input element),
There is no clear way how to do that, can please provide me with clear example!

Steps To Reproduce:

When I check the your code:

  /**
     * @param Element $element that accepts a string
     * @param string $keys send to $element
     * @return \PHPUnit_Extensions_Selenium2TestCase_Response
     */
    public function sendKeys($element, $keys)
    {
        return $element->setValueImmediate($keys);
    }

The problem is here you can't get the elementby ID like this:

`$I->getElement('#f_Last_Name');`
or other ways I tried 

Please add clear example how to open browser and fill form in android and Ios 
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

1 participant