From 479ec659269b3947a77a7849f92995e93fc0a3c3 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Thu, 8 Nov 2018 11:15:00 -0500 Subject: [PATCH] Update the ReadMe --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 49e09c48..4d730908 100755 --- a/README.md +++ b/README.md @@ -314,14 +314,14 @@ Using ``--html=report.html`` gives you a fancy report of the name specified afte pytest my_test_suite.py --html=report.html ``` +![](https://cdn2.hubspot.net/hubfs/100006/images/PytestReport.png "Example Pytest Report") + You can also use ``--junitxml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests. ``` pytest my_test_suite.py --junitxml=report.xml ``` -![](https://cdn2.hubspot.net/hubfs/100006/images/PytestReport.png "Example Pytest Report") - #### **Nosetest Reports:** The ``--report`` option gives you a fancy report after your test suite completes. @@ -622,7 +622,7 @@ If the web page you're on already has jQuery loaded, you can start executing jQu You'd know this because the web page would contain something like the following in the HTML: ```html - + ``` It's OK if you want to use jQuery on a page that doesn't have it loaded yet. To do so, run the following command first: @@ -631,6 +631,8 @@ It's OK if you want to use jQuery on a page that doesn't have it loaded yet. To self.activate_jquery() ``` +Some websites have a restrictive [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) to prevent users from loading jQuery and other external libraries onto their websites. If you need to use jQuery or another JS library on such a website, use Firefox with SeleniumBase, which overrides the CSP to allow loading of any JS library. + Here are some examples of using jQuery in your scripts: ```python self.execute_script('jQuery, window.scrollTo(0, 600)') # Scrolling the page