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

[WebDriver] getCapabilities method does not exist in facebook/webdriver < 1.3.0 #4435

Closed
daudmalik06 opened this Issue Aug 4, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@daudmalik06

daudmalik06 commented Aug 4, 2017

Acceptance testing

Hello in codeception version 2.3 , you guys have changed the _before method of
Codeception/src/Codeception/Module/WebDriver.php

 $test->getMetadata()->setCurrent([
            'browser' => $this->webDriver->getCapabilities()->getBrowserName(),
            'capabilities' => $this->webDriver->getCapabilities()->toArray()
        ]);

and in the requirements of codeception you can find
facebook/webdriver: >=1.0.1 <2.0

but if you check the facebook/webdriver:1.2
you will not find any getCapabilities method in php-webdriver/lib/Remote/RemoteWebDriver.php

this will raise an error during run time as
Call to undefined method Facebook\WebDriver\Remote\RemoteWebDriver::getCapabilities()

if some one is using facebook/webdriver:1.2

so i think this should be changed in composer
what do you think ?
if yes i can make a pull request

Details

  • Codeception version: 2.3.4
  • PHP Version:7.1.7
  • Operating System: windows
  • Installation type: Composer
@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Aug 4, 2017

Member

Codeception 2.3 still supports PHP 5.4.

The last version of facebook/webdriver which supported PHP 5.4 was 1.1.3.
I think that the right solution would be to fix _before to work with 1.1.3, even if it disables capabilities feature for PHP 5.4

Member

Naktibalda commented Aug 4, 2017

Codeception 2.3 still supports PHP 5.4.

The last version of facebook/webdriver which supported PHP 5.4 was 1.1.3.
I think that the right solution would be to fix _before to work with 1.1.3, even if it disables capabilities feature for PHP 5.4

@Naktibalda Naktibalda added the WebDriver label Aug 4, 2017

@Naktibalda Naktibalda changed the title from wrong facebook/webdriver version to [WebDriver] getCapabilities method does not exist in facebook/webdriver < 1.3.0 Aug 4, 2017

@daudmalik06

This comment has been minimized.

Show comment
Hide comment
@daudmalik06

daudmalik06 Aug 5, 2017

yeah it can be or may be change composer.json to restrict usage of facebook/webdriver
to facebook/webdriver:>1.3

daudmalik06 commented Aug 5, 2017

yeah it can be or may be change composer.json to restrict usage of facebook/webdriver
to facebook/webdriver:>1.3

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Aug 5, 2017

Member

Setting >1.3 is not possible in Codeception 2.3, because it raises minimum required version of PHP to 5.5

Member

Naktibalda commented Aug 5, 2017

Setting >1.3 is not possible in Codeception 2.3, because it raises minimum required version of PHP to 5.5

Naktibalda added a commit to Naktibalda/Codeception that referenced this issue Aug 5, 2017

[WebDriver] Fixed fatal error in _before on PHP 5.4
webDriver->getCapabilities() is available in facebook/php-webdriver >=1.3.0 which requires PHP 5.5
closes #4435

@DavertMik DavertMik closed this in #4436 Aug 8, 2017

DavertMik added a commit that referenced this issue Aug 8, 2017

[WebDriver] Fixed fatal error in _before on PHP 5.4 (#4436)
webDriver->getCapabilities() is available in facebook/php-webdriver >=1.3.0 which requires PHP 5.5
closes #4435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment