Skip to content

Commit 369f01c

Browse files
committed
Update the docs
1 parent faada22 commit 369f01c

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ nosetests [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
267267
<p>SeleniumBase methods automatically wait for page elements to finish loading before interacting with them (<i>up to a timeout limit</i>). This means you <b>no longer need</b> random <span><b>time.sleep()</b></span> statements in your scripts.</p>
268268
<img src="https://img.shields.io/badge/Flaky Tests%3F-%20NO%21-11BBDD.svg" alt="NO MORE FLAKY TESTS!" />
269269
270-
✅ Automated/Manual Hybrid Mode:</h4>
270+
✅ Automated/Manual Hybrid Mode:
271271
<p>SeleniumBase includes a solution called <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md">MasterQA</a></b>, which speeds up manual testing by having automation perform all the browser actions while the manual tester handles validation.</p>
272272
273273
✅ Feature-Rich:
@@ -628,6 +628,11 @@ pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1
628628
```
629629
630630
631+
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Handling Pop-Up / Pop Up Alerts:</h3>
632+
633+
🔵 <code>self.accept_alert()</code> automatically waits for and accepts alert pop-ups. <code>self.dismiss_alert()</code> automatically waits for and dismisses alert pop-ups. On occasion, some methods like <code>self.click(SELECTOR)</code> might dismiss a pop-up on its own because they call JavaScript to make sure that the <code>readyState</code> of the page is <code>complete</code> before advancing. If you're trying to accept a pop-up that got dismissed this way, use this workaround: Call <code>self.find_element(SELECTOR).click()</code> instead, (which will let the pop-up remain on the screen), and then use <code>self.accept_alert()</code> to accept the pop-up (<a href="https://github.com/seleniumbase/SeleniumBase/issues/600#issuecomment-647270426">more on that here</a>). If pop-ups are intermittent, wrap code in a try/except block.
634+
635+
631636
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Building Guided Tours for Websites:</h3>
632637
633638
🔵 Learn about <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">SeleniumBase Interactive Walkthroughs</a> (in the ``examples/tour_examples/`` folder). It's great for prototyping a website onboarding experience.
@@ -841,18 +846,6 @@ self.switch_to_frame('ContentManagerTextBody_ifr')
841846
self.switch_to_default_content() # Exit the iFrame when you're done
842847
```
843848
844-
🔵 Handling Pop-Up Alerts:
845-
846-
<p>What if your test makes an alert pop up in your browser? No problem. You need to switch to it and either accept it or dismiss it:</p>
847-
848-
```python
849-
self.wait_for_and_accept_alert()
850-
851-
self.wait_for_and_dismiss_alert()
852-
```
853-
854-
If you're not sure whether there's an alert before trying to accept or dismiss it, one way to handle that is to wrap your alert-handling code in a try/except block. Other methods such as .text and .send_keys() will also work with alerts.
855-
856849
🔵 Executing Custom jQuery Scripts:
857850
858851
<p>jQuery is a powerful JavaScript library that allows you to perform advanced actions in a web browser.

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ click==8.0.1;python_version>="3.6"
1212
zipp==3.5.0;python_version>="3.6"
1313
readme-renderer==29.0
1414
pymdown-extensions==8.2;python_version>="3.6"
15-
importlib-metadata==4.6.3;python_version>="3.6"
15+
importlib-metadata==4.6.4;python_version>="3.6"
1616
lunr==0.6.0;python_version>="3.6"
1717
nltk==3.6.2;python_version>="3.6"
18-
watchdog==2.1.3;python_version>="3.6"
18+
watchdog==2.1.5;python_version>="3.6"
1919
mkdocs==1.2.2;python_version>="3.6"
2020
mkdocs-material==7.1.3;python_version>="3.6"
2121
mkdocs-exclude-search==0.5.2;python_version>="3.6"

seleniumbase/plugins/s3_logging_plugin.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
The S3 Logging Plugin to upload all logs to the S3 bucket specified.
2+
The S3 Logging Plugin lets you upload test logs to the S3 bucket specified.
33
"""
44

55
import uuid
@@ -10,11 +10,8 @@
1010

1111

1212
class S3Logging(Plugin):
13-
"""
14-
The plugin for uploading test logs to the S3 bucket specified.
15-
"""
16-
17-
name = "s3_logging" # Usage: --with-s3_logging
13+
"""The plugin for uploading test logs to the S3 bucket specified."""
14+
name = "s3_logging" # Usage: --with-s3-logging
1815

1916
def configure(self, options, conf):
2017
""" Get the options. """
@@ -40,8 +37,8 @@ def afterTest(self, test):
4037
print("\n\n*** Log files uploaded: ***\n%s\n" % index_file)
4138
logging.error("\n\n*** Log files uploaded: ***\n%s\n" % index_file)
4239

43-
# If the database plugin is running, attach a link
44-
# to the logs index database row
40+
# If the SB database plugin is also being used,
41+
# attach a link to the logs index database row.
4542
if hasattr(test.test, "testcase_guid"):
4643
from seleniumbase.core.testcase_manager import (
4744
TestcaseDataPayload,

0 commit comments

Comments
 (0)