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

Update switchToIFrame #6

Closed
wants to merge 2 commits into from
Closed

Update switchToIFrame #6

wants to merge 2 commits into from

Conversation

eXorus
Copy link
Member

@eXorus eXorus commented Mar 3, 2020

My test was OK previously and after a composer update they was KO:

  • codeception/codeception (4.0.3 => 4.1.1)
  • codeception/module-webdriver (1.0.1 => 1.0.3)
  • php-webdriver/webdriver (1.7.1 => 1.8.1)

I have an error when I use switchToIFrame with a name:
$I->switchToIFrame("react-tinymce-0_ifr")

Error: [InvalidArgumentException] In W3C compliance mode frame must be either instance of WebDriverElement, integer or null

@Naktibalda
Copy link
Member

This patch changes behaviour of switchToIFrame completely - it will no longer accept iframe name.

It would be great to preserve original behaviour by creating xpath with iframe name automatically.

@eXorus
Copy link
Member Author

eXorus commented Mar 3, 2020

Now I keep the locator by name, CSS or XPath.

@Naktibalda
Copy link
Member

Thanks, I fixed a few issues to get test passing and merged it to master: ca75910

Are you familiar with any other recent WebDriver issues, e.g. RemoteWebElement::getCoordinates() returning center of the element instead of top-left corner? https://github.com/Codeception/Codeception/issues/5844

or unable to set cookie error that makes all cookie and snapshot tests fail with:


  [Facebook\WebDriver\Exception\UnableToSetCookieException] unable to set cookie
  (Session info: headless chrome=80.0.3987.122)
                                                                                                                             
#1  /.../module-webdriver/vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:131
#2  /.../module-webdriver/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:370
#3  /.../module-webdriver/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:584
#4  /.../module-webdriver/vendor/php-webdriver/webdriver/lib/Remote/RemoteExecuteMethod.php:27
#5  /.../module-webdriver/vendor/php-webdriver/webdriver/lib/WebDriverOptions.php:48
#6  /.../module-webdriver/src/Codeception/Module/WebDriver.php:861
#7  /.../module-webdriver/tests/unit/Codeception/Module/TestsForWeb.php:791
#8  /.../module-webdriver/tests/web/WebDriverTest.php:777

@Naktibalda Naktibalda closed this Mar 4, 2020
@eXorus
Copy link
Member Author

eXorus commented Mar 4, 2020

No sorry I don't have any issues with cookie and I don't use moveMouseOver and clickWithLeftButton.

@Naktibalda
Copy link
Member

I released this change as 1.0.4

@eXorus eXorus deleted the patch-2 branch March 9, 2020 13:36
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

Successfully merging this pull request may close these issues.

None yet

2 participants