Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Protractor on a browser without a dedicated WebDriver implementation?

I'm trying to set up end-to-end tests for an AngularJS web app. I want to run the tests on a device with a quite rare WebKit based browser, which has no WebDriver implementation. Currently we're using angular-scenario which works just fine, but since that's deprecated, using Protractor would be more future-proof.

Is there a WebDriver implementation, implementing a sub-set of the WebDriver interface, for browsers currently missing a dedicated WebDriver implementation?

like image 499
David Pärsson Avatar asked Nov 09 '22 20:11

David Pärsson


1 Answers

As there is no WebDriver for the WebKit based browser you're using, there is no easy way about it.

Using protractor is ideal as it controls the browser at a higher level than angular-scenario. angular-scenario in theory is a WebSocket connection controlling and asserting on a iFrame, this starts to break down when the guest source doesn't want to be in a iFrame and other abnormalities that generally are not experienced that present false positives.

As the particulars to the WebKit version are not released, I can only offer a few suggestions what I would attempt next.

You have only a couple choices:

  1. Ask the browser developers to point you to a Selenium WebDriver implementation.
  2. Build your own WebDriver as an extension that communicates over WebSocket's, using SafariDriver for reference.
  3. Stick with angular-scenario, or somewhat a version there of.

Good luck with your project.

like image 173
kylewelsby Avatar answered Nov 15 '22 13:11

kylewelsby