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 screenshot at failure is throwing an error #961
Comments
|
You are correct, Question does |
I removed both |
Hey @mhightower, Wondering how you got the error? Are you using Test with webdriver or Cest with webdriver? |
I'm using Test. It seems to be calling |
@mhightower , I see, I think Test is better for making unit test in codeception, if you want to do selenium tests or tests interacting with browsers, Cest is better option for you To be frank, I never used Test with Webdriver, thought it's for unit tests, but not 100% sure. |
I'm using Test because it gives me a few more options and more familiar with PHPUnit. I will take a look at Cest but I think if we can give tearDown() function the correct calls it would work fine. |
@mhightower Yep, that's an interesting case. Not sure what else calls |
Here are the two function traces. |
sorry, I can't open this format. Can you put traces here? |
The links are publicly viewable and they are big are you sure you can't see them from google drive? |
You may think of me as tech (google) idiot. And probably I am :) But GDrive opens file |
You then just download the file. .xt is just a plain text file that xdebug produced. |
get the same issue. not every time but with rarely frequency. |
Outdated. Reopen if it is still relevant |
codeception 2.0.8
for sure i can wrap |
Getting the same error using 2.1.0:
I do think this is a valid cause for reopening |
codeception v1.8.4
I'm running the WebDriver module and getting this error when a test fails.
Fatal error: Call to a member function takeScreenshot() on a non-object in /Users/mhightower/PhpstormProjects/SauceExtension/vendor/codeception/codeception/src/Codeception/Module/WebDriver.php on line 163
What I'm seeing is that the WebDriver::_after() is destroying the WebDriver::$webDriver object before WebDriver::_saveScreenshot() is called. WebDriver::_saveScreenshot() is using the WebDriver::$webDriver object to create the screenshot.
I have confirmed that the WebDriver::webDriver was created successfully.
I'm trying to decide if adding a check for the webdriver object is a good fix or if it is a defect further up in the logic?
The text was updated successfully, but these errors were encountered: