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

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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@daison12006013

daison12006013 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.

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

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Mar 1, 2017

Member

Thanks for the report. Looks like a bug of ActionSequence

Member

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 DavertMik closed this in #4066 Mar 21, 2017

DavertMik added a commit that referenced this issue Mar 21, 2017

Fixed action sequence to include multiple actions (#4066)
* 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 added a commit to chris1312/Codeception that referenced this issue Jun 16, 2017

Fixed action sequence to include multiple actions (#4066)
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment