Skip to content
This repository was archived by the owner on Dec 24, 2023. It is now read-only.

Conversation

@sneakypete81
Copy link
Contributor

When using WDIO to test a Firefox Webextension, the Geckodriver context can be set to "chrome" in order to control elements of the browser itself (toolbar, browser popups, etc.). In this context, several document attributes are not available (head, body, documentElement, etc.).

It would be useful to use webdriver-image-comparison in this context. Currently the client-side scripts fail when attempting to add/remove custom CSS and when obtaining the body/html attributes during getScreenDimensions. None of this is necessary in this context.

In this PR I've added null checks to prevent the client-side scripts from failing if these document attributes are not available.

@wswebcreation wswebcreation self-requested a review May 8, 2019 09:39
Copy link
Owner

@wswebcreation wswebcreation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sneakypete81

Thanks for this PR and also nice to see that people are using the library in this way. Can you add some UT's to cover the changes?

Thanks

@sneakypete81 sneakypete81 force-pushed the client_script_robustness branch from 231e58c to 89633e9 Compare May 8, 2019 10:38
@sneakypete81
Copy link
Contributor Author

Tests added - and thanks, this utility is really useful.

@wswebcreation
Copy link
Owner

@sneakypete81

Thanks for the update, currently at the airport, will create a new release when I'm back, will be end of the day or else tomorrow.

@wswebcreation wswebcreation merged commit 63403ac into wswebcreation:master May 9, 2019
@wswebcreation
Copy link
Owner

@sneakypete81

Tnx for the work, I've just released v0.4.8. Remove all node_modules and the package-lock.json from your project and do a new install and it will automatically get the right version

@sneakypete81
Copy link
Contributor Author

Nice one, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants