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

Supported testing browsers? #2868

Closed
dominik0711 opened this issue Oct 23, 2014 · 5 comments
Closed

Supported testing browsers? #2868

dominik0711 opened this issue Oct 23, 2014 · 5 comments

Comments

@dominik0711
Copy link

Which are the supported browsers for testing and how do I set them with the command line option --browsers?

What about grunt testing? I would like to set specific browsers in my tasks as well. How do I have to set them? This is my Gruntfile.js section:

    'wct-test': {
        local: {
            options: {remote: false, browsers: ['chrome','canary','firefox'], verbose: true}
        },
        remote: {
            options: {remote: true},
        },
    },

Only chrome is a valid option!

@nevir
Copy link
Contributor

nevir commented Oct 23, 2014

I'm actually not sure where to get the canonical list of driver names, I'll get back to you on that. Confusingly, the --browsers flag is actually just shorthand for the selenium driver name

The grunt configuration also accepts capabilities objects for browsers. Firefox should work (do you not have it installed, or have it in a non-standard location?), but chrome canary won't

Unfortunately, selenium doesn't have any knowledge of local browser versions (it just wants the executable path). For WCT's detection, I'm making use of launchpad to detect installed browsers: https://github.com/Polymer/web-component-tester/blob/master/runner/detectbrowsers.js

It gives us nice browser names and versions: https://github.com/ekryski/launchpad/blob/master/lib/local/platform/macos.js

Leaving this issue open as a task to accept launchpad browser names when you pass a string (rather than selenium driver names)

@dominik0711
Copy link
Author

Could you please describe how to use launchpad in conjunction with grunt process to stay platform independant?

Opera browsers are not supported right now, right? I'll get an error when I try to execute my tests with the following command: wct --browsers opera

What about phantomjs. What's the correct command line parameter for that? I have installed phantomjs to /usr/local/bin. When trying to execute my tests with phantomjs I'll run into an Timed out failure. This is my command line: wct --browsers phantomjs

The following error occur:

Web server running on port 51598 and serving from <XXX>
Selenium server running on port 51599
phantomjs                Tests failed: Timed out
Test run ended in failure: Timed out

phantomjs (error)


Timed out

@nevir nevir self-assigned this Oct 24, 2014
@nevir
Copy link
Contributor

nevir commented Oct 24, 2014

Alright, so the launchpad integration turned out to be somewhat thorny when integrated remotely, I've added browser expansion into WCT proper to hopefully make things easier:

Your original options should work now:

        local: {
            options: {browsers: ['chrome','canary','firefox'], verbose: true}
        },

Additionally, you can specify remote Sauce browsers via shorthand: ['Windows 8.1/Firefox@33'], etc (all this should work via command line too)

re: opera, unfortunately Selenium's OperaDriver doesn't support modern versions of Opera (and testing chrome should be very similar)

@nevir
Copy link
Contributor

nevir commented Oct 24, 2014

(I haven't pushed this as a wct release just yet, should by EOD)

@nevir
Copy link
Contributor

nevir commented Oct 24, 2014

Published as web-component-tester 1.2.0 - closing; feel free to re-open if you have any issues!

@nevir nevir closed this as completed Oct 24, 2014
@aomarks aomarks transferred this issue from Polymer/web-component-tester Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants