You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3><img src="https://seleniumbase.io/img/green_logo.png" title="SeleniumBase" width="32" /> Production Environments & Integrations:</h3>
696
696
697
-
🔵 Here are some things you can do to set up a production environment for your testing:
697
+
<details>
698
+
<summary>🔵 Here are some things you can do to set up a production environment for your testing.</summary>
698
699
699
700
* You can set up a [Jenkins](https://jenkins.io/) build server for running tests at regular intervals. For a real-world Jenkins example of headless browser automation in action, check out the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md">SeleniumBase Jenkins example on Azure</a> or the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md">SeleniumBase Jenkins example on Google Cloud</a>.
* If you're using AWS, you can set up an [Amazon S3](https://aws.amazon.com/s3/) account forsaving log files and screenshots from your tests. To activate this feature, modify [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) with connection detailsin the S3 section, and add "``--with-s3-logging``" on the command-line when running your tests.
708
709
709
-
Here's an example of running tests with additional features enabled:
710
+
Here's an example of running tests with some additional features enabled:
(Most of the above commands can be done directly with built-in SeleniumBase methods.)
948
953
954
+
</details>
955
+
949
956
🔵 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, add ``--disable-csp`` on the command-line.
950
957
951
-
🔵 In the next example, JavaScript creates a referral button on a page, which is then clicked:
958
+
<details>
959
+
<summary>🔵 In this example, JavaScript creates a referral button on a page, which is then clicked.</summary>
952
960
953
961
```python
954
962
start_page = "https://xkcd.com/465/"
@@ -961,6 +969,8 @@ self.click("a.analytics") # Clicks the generated button
961
969
962
970
(Due to popular demand, this traffic generation example has been included in SeleniumBase with the ``self.generate_referral(start_page, end_page)`` and the ``self.generate_traffic(start_page, end_page, loops)`` methods.)
963
971
972
+
</details>
973
+
964
974
🔵 Using deferred asserts:
965
975
966
976
<p>Let's say you want to verify multiple different elements on a web page in a single test, but you don't want the test to fail until you verified several elements at once so that you don't have to rerun the test to find more missing elements on the same page. That's where deferred asserts come in. Here's the example:</p>
0 commit comments