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

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

Closed
daudmalik06 opened this issue Aug 4, 2017 · 3 comments
Closed
Labels

Comments

@daudmalik06
Copy link

@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
Copy link
Member

@Naktibalda 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 wrong facebook/webdriver version [WebDriver] getCapabilities method does not exist in facebook/webdriver < 1.3.0 Aug 4, 2017
@daudmalik06
Copy link
Author

@daudmalik06 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
Copy link
Member

@Naktibalda 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->getCapabilities() is available in facebook/php-webdriver >=1.3.0 which requires PHP 5.5
closes Codeception#4435
DavertMik added a commit that referenced this issue Aug 8, 2017
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
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.