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

Problems with fillField on real device with safari #5370

Closed
elijah0107 opened this issue Jan 31, 2019 · 9 comments
Closed

Problems with fillField on real device with safari #5370

elijah0107 opened this issue Jan 31, 2019 · 9 comments

Comments

@elijah0107
Copy link

What are you trying to achieve?

I am trying to fill field on real device with browser safari. But after but after going to the next step, value in input becomes empty

What do you get instead?

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

# paste output here

Provide test source code if related

        $I->amOnPage(CartPage::$acceptanceRoute);
        $I->wait(2);
        $I->waitForElementVisible(CartPage::$checkoutButtonSelector);
        $I->click(CartPage::$checkoutButtonSelector);
        $I->wait(3);
        $I->fillField(OrderForm::$inputEmailFieldSelector, 'bfhjsadf@jafgvadfhgdf.eu');
        $I->wait(2);
        $I->fillField(OrderForm::$inputNameFieldSelector, 'test');
        $I->appendField(OrderForm::$inputNameFieldSelector, 'test');
        $I->click(OrderPage::$newOrderSendOrderButtonSelector);

Details

  • Codeception version: 2.5.5
  • PHP Version: 5.6
  • Operating System: MacOS
  • Installation type: Composer
  • List of installed packages (composer show)
  • Suite configuration:
actor: Acceptance_mobileTester
modules:
    enabled:
        - WebDriver
        - Asserts
        - tests\AcceptanceHelper
    config:
        WebDriver:
            host: seleniumhub
            url:
            browser: safari
env:
    iphone:
           modules:
               enabled:
                  - WebDriver
                  - Asserts
               config:
                   WebDriver:
                      host: 0.0.0.0
                      port: 4723
                      url: ***
                      browser: safari
                      restart: true
                      timeout: 100
                      capabilities:
                          browserName: safari
                          xcodeOrgId: '79C4Q93M59'
                          xcodeSigningId: 'iPhone Developer'
                          platformName: 'iOS'
                          platformVersion: '12.1.2'
                          deviceName: 'iPhone'
                          udid: 'f325b6bc5fe21a3fc9657ed75a28df4c438c3c83'
                          useNewWDA: false
                          newCommandTimeout: 7200
                          automationName: 'XCUITest'
                          autoAcceptAlerts: true
                          fullReset: false
                          noReset: true
                          nativeInstrumentsLib: true
                          connection_timeout: 500cd
                          request_timeout: 500
                          skipUnlock: true
                          clearSystemFiles: true
                          showIOSLog: true
                          safariInitialUrl: about:blank
                          CURLOPT_TIMEOUT: 900
@Naktibalda
Copy link
Member

If it doesn't happen with other browsers, it is an issue of Safari.

Also it could be caused by javascript code of your website.

@elijah0107
Copy link
Author

elijah0107 commented Jan 31, 2019

It happen in Chrome, but helps
$I->pressKey(ProductPage::$amountSelector,\Facebook\WebDriver\WebDriverKeys::ENTER);

@Naktibalda
Copy link
Member

Doesn't it happen when you test this website manually?

@elijah0107
Copy link
Author

Manually it works correct

@elijah0107
Copy link
Author

any ideas?

@elijah0107
Copy link
Author

Can i expect, you to fix that or i need to look for an alternative solution?

@Naktibalda
Copy link
Member

It isn't an issue of Codeception, most likely it is an issue of SafariDriver.
Please raise an issue at https://bugreport.apple.com/

@elijah0107
Copy link
Author

But why this issue repeat with chromedriver too?

@Naktibalda
Copy link
Member

ChromeDriver has it's own share of sendKeys issues.
Here is an example of issue where each browser behaved differently: https://stackoverflow.com/questions/31547459/selenium-sendkeys-different-behaviour-for-chrome-firefox-and-safari/31559637#31559637

Can you reproduce this issue using a simple HTML page with no client side javascript code?

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