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

Weird scenario using performOn() with multiple fillField() #4044

Closed
daison12006013 opened this issue Mar 1, 2017 · 2 comments
Closed

Weird scenario using performOn() with multiple fillField() #4044

daison12006013 opened this issue Mar 1, 2017 · 2 comments
Labels

Comments

@daison12006013
Copy link

@daison12006013 daison12006013 commented Mar 1, 2017

What are you trying to achieve?

Modal fillField using performOn(), seems only the last fillField() chain is called, since I have multiple fillField() call.

What do you get instead?

Only the last fillField() chain is called, nothing else, check my bash output.

Provide console output if related. Use -vvv mode for more details.

...
    Upload Photo
  First Name *
  Last Name *
  Email *
  Contact Number *
                              * Account For
                                                              Lol
                                                              Group HR
                                                              Chain HR
                                                              Enterprise HR
                                                              Hiring Officer
                                                              Event Supervisor

  CREATE
  CANCEL
  [Action] see "Create A New Account"
  [Action] fill field "#first_name","Pedro"
  [Action] select option "#role_slug","Lol"
  [Action] click "#pushcreate_new_account"

Provide test source code if related

I->performOn('#create-new-account', \Codeception\Util\ActionSequence::build()
    ->see('Create A New Account')
    ->fillField('#phone', '1234567890')
    ->fillField('#last_name', 'Dela Cruz')
    ->fillField('#email', sprintf('%s@%s.com', str_random('10'), str_random('5')))
    ->fillField('#first_name', 'Pedro')
    ->selectOption('#role_slug', 'Lol')
    ->click('#pushcreate_new_account')
    // ->waitForElement('#account-succesfully-created', 60)
    // ->see('Account Successfully Created', '#account-succesfully-created')
);

Details

  • Codeception version: 2.2.9
  • PHP Version: PHP 7.0.8-2+deb.sury.org~xenial+1 (cli) ( NTS )
  • Operating System: Ubuntu Vagrant (laravel homestead)
  • Installation type: Composer
  • Suite configuration:
class_name: LolTester
modules:
    enabled:
      - WebDriver
      - \Helper\Lol
      - Laravel5:
          part: ORM
          cleanup: true
    config:
      WebDriver:
        url: '{something here...}'
        browser: phantomjs
        port: 9988
        capabilities:
            # phantomjs.page.settings.userAgent: "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36"
            phantomjs.page.settings.userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
@daison12006013
Copy link
Author

@daison12006013 daison12006013 commented Mar 1, 2017

Updates:

This is only a bug when using Codeception\Util\ActionSequence, but if you use the callback Codeception\Module\WebDriver, it all works well.

@DavertMik
Copy link
Member

@DavertMik DavertMik commented Mar 1, 2017

Thanks for the report. Looks like a bug of ActionSequence

DavertMik added a commit that referenced this issue Mar 20, 2017
DavertMik added a commit that referenced this issue Mar 21, 2017
* Fixed action sequence to include multiple actions of same name. Fixes #4044

* action sequence to convert array to actions and execute them inside a context of an element
chris1312 pushed a commit to chris1312/Codeception that referenced this issue Jun 16, 2017
* Fixed action sequence to include multiple actions of same name. Fixes Codeception#4044

* action sequence to convert array to actions and execute them inside a context of an element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.