![Page 1: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/1.jpg)
Mozilla Web QAEvolution of our PythonWebDriver framework
@davehunt82 - http://blargon7.com
![Page 3: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/3.jpg)
Foundations
Selenium Python pytest
![Page 4: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/4.jpg)
pytest-mozwebqaThe clue is in the name...
✓ share common code✓ transition to WebDriver✓ custom HTML reports✓ sauce labs integration✓ credentials injection
๏ bespoke to Mozilla’s needs๏ solves too many problems๏ slow release process๏ inadequate documentation๏ incompatible with “live servers”
![Page 5: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/5.jpg)
Evolutionpytest-variables
Simple variable injection for tests
pytest-htmlHTML report for tests
pytest-seleniumBrowser automation for tests
![Page 6: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/6.jpg)
pytest-variableshttps://pypi.python.org/pypi/pytest-variables
{ "foo": "bar", "bar": "foo"}
def test_foo(variables): assert variables['foo'] == 'bar' assert variables.get('bar') == 'foo' assert variables.get('missing') is None
![Page 7: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/7.jpg)
pytest-htmlhttps://pypi.python.org/pypi/pytest-html
from http://qutebrowser.org:8010/waterfall
from http://qutebrowser.org:8010/waterfall
![Page 8: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/8.jpg)
pytest-seleniumhttps://pypi.python.org/pypi/pytest-selenium
✓ no longer supports legacy Selenium RC✓ uses pytest fixtures for support of live servers
✓ augments pytest-html report✓ documentation!
Sauce Labs BrowserStack TestingBot
![Page 9: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/9.jpg)
Demo...all the things!
![Page 10: Mozilla Web QA - Evolution of our Python WebDriver framework](https://reader036.vdocument.in/reader036/viewer/2022083117/5880e7ec1a28ab0d358b5ee9/html5/thumbnails/10.jpg)
Resources• pytest-variables - https://pypi.python.org/pypi/pytest-variables• pytest-html - https://pypi.python.org/pypi/pytest-html• pytest-selenium - https://pypi.python.org/pypi/pytest-selenium• examples - https://github.com/mozilla/mozwebqa-examples• team - https://quality.mozilla.org/teams/web-qa• email - [email protected]