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

Have MDK specify alternate Behat browsers #163

Open
andrewnicols opened this issue Nov 15, 2017 · 7 comments
Open

Have MDK specify alternate Behat browsers #163

andrewnicols opened this issue Nov 15, 2017 · 7 comments

Comments

@andrewnicols
Copy link
Contributor

It would be handy if we could more easily allow for selection of a different browser.

In terms of config, we just need something like:

$CFG->behat_profiles = [
    'chrome' => [
        'browser' => 'chrome',
    ],
    'firefox' => [
        'browser' => 'firefox',
    ],
];

$CFG->behat_profiles['default'] = $CFG->behat_profiles['chrome'];

And then to run, we need to specify an additional argument when running behat:

--profile chrome

The existing behat addConfig commands in MDK only deal with a line at a time.
I'd like to suggest we perhaps add a line to require_once another config file (stored within MDK somewhere) to help with this.

@FMCorz
Copy link
Owner

FMCorz commented Nov 15, 2017

I agree, I've ran into that as well.

@nwp90
Copy link

nwp90 commented Sep 9, 2020

Would be particularly nice if this could allow us to avoid selenium completely & use ChromeDriver (ideally by default).

@andrewnicols
Copy link
Contributor Author

I'm working on improving his in Moodle more generally to improve support. When I get that over the line (i.e. when I have some time) I also intend to consider shipping some defaults, and to consider how these fit into MDK.

@nwp90
Copy link

nwp90 commented Sep 10, 2020

Oh, hi :) That was quick!
Yeah, I've just been looking at it and it does rather look like https://tracker.moodle.org/browse/MDL-58948 doesn't quite go far enough for this to be done "nicely" with MDK, and https://tracker.moodle.org/browse/MDL-59479 probably needs some love. I can probably justify spending some time on this at the moment, so if there's anything I can do now to help, let me know.

@andrewnicols
Copy link
Contributor Author

Yup - take a look at MDL-66979 instead. I'm trying to migrate to W3C WebDriver so we can ditch the JsonWire webdriver we currently use. That opens things up massively for other browsers (Edge, Firefox, Safari).

@nwp90
Copy link

nwp90 commented Sep 10, 2020

A quick look at that looks like you've got the basics working and now going through all the tests to fix up anything that needs updating to make sure they still pass?

@nwp90
Copy link

nwp90 commented Sep 10, 2020

In fact it looks like you're nearly done - is there any particular area that it would be helpful to try out/look at/beat into submission?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants