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

Exception when testing with PhantomJS #1250

Closed
sudsy opened this issue Jul 28, 2017 · 3 comments
Closed

Exception when testing with PhantomJS #1250

sudsy opened this issue Jul 28, 2017 · 3 comments
Labels
STATE: Auto-locked Issues that were automatically locked by the Lock bot

Comments

@sudsy
Copy link

sudsy commented Jul 28, 2017

I have seen that phantomjs support is deprecated, but I need to use it because it seems to closely mirror the behaviour of the googlebot.

(For instance const declarations in certain situations seem to break both googlebot and phantomjs - I will write something up on this once I can demonstrate a clear case)

I am happy to put in a PR for this one if you would accept it.

Basically, on one of the pages I am testing I get

Message: FocusEventConstructor is not a constructor (evaluating 'new
      p["default"].WindowFocusEvent(t,{bubbles:o,cancelable:!1,cancelBubble:!1,defaultPrevented:!1})')

Seems to come down to the feature detection on this line:

@miherlosev
Copy link
Contributor

We have researched the possibility to support PhantomJS.
There are several issues we need to take into account:
[Object.defineProperty]
ariya/phantomjs#14310
ariya/phantomjs#13895
[Psedo-selector :focus]
ariya/phantomjs#10427
[WebWorker]
ariya/phantomjs#13653
These problems affect many parts of our code and it takes huge work to fix them.
Are you sure you want to do it?

Also note that PhantomJS development is finished (https://groups.google.com/forum/#!msg/phantomjs/9aI5d-LDuNE/5Z3SMZrqAQAJ).
The good alternative to PhantomJS is Google Chrome in the headless mode
TestCafe ships with build-in support for headless testing.
For more details, see the Running Tests in Headless Mode article

@sudsy
Copy link
Author

sudsy commented Jul 28, 2017

That sounds like a world of pain. Thanks for the heads up.

While I do need to do some testing on an old version of webkit to ensure compatibility with googlebot, the tests are fairly simple and could be managed by driving phantomjs directly.

Cheers,

Ben

@sudsy sudsy closed this as completed Jul 28, 2017
@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked Issues that were automatically locked by the Lock bot label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked Issues that were automatically locked by the Lock bot
Projects
None yet
Development

No branches or pull requests

2 participants