Skip to content

Commit b420059

Browse files
committed
Update the docs
1 parent 5b816bf commit b420059

File tree

5 files changed

+69
-16
lines changed

5 files changed

+69
-16
lines changed

examples/example_logs/ReadMe.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ pytest test_suite.py --dashboard --html=report.html
7272

7373
<img src="https://seleniumbase.io/cdn/img/dash_report.jpg" alt="Dashboard Pytest HTML Report" title="Dashboard Pytest HTML Report" width="520" />
7474

75-
If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356) for the html to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/).
75+
--------
76+
77+
If viewing ``pytest-html`` reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356) for the HTML to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/). That setting can be changed from ``Manage Jenkins`` > ``Script Console`` by running:
78+
79+
```
80+
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")
81+
```
82+
83+
--------
7684

7785
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
7886

examples/master_qa/ReadMe.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44

55
![](https://seleniumbase.io/cdn/gif/masterqa6.gif "MasterQA")
66

7-
Here's example code from [basic_masterqa_test_0.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/basic_masterqa_test_0.py):
7+
Here's code from [basic_masterqa_test_0.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/basic_masterqa_test_0.py):
88

99
```python
10-
self.open("https://xkcd.com/1700/")
11-
self.verify("Do you see a webcomic?")
12-
self.highlight_click('link=Blag')
13-
self.verify('Do you see a blog archive?')
14-
self.highlight_update_text("input#s", "Dragons\n")
15-
self.verify('Do you see "dragons" in the search results?')
10+
from seleniumbase import MasterQA
11+
12+
class MasterQATests(MasterQA):
13+
def test_masterqa(self):
14+
self.open("https://xkcd.com/1700/")
15+
self.verify("Do you see a webcomic?")
16+
self.open("https://seleniumbase.io/demo_page")
17+
self.highlight('table')
18+
self.verify("Do you see elements in a table?")
19+
self.open("https://seleniumbase.io/devices/")
20+
self.highlight("div.mockup-wrapper")
21+
self.verify("Do you see 4 computer devices?")
1622
```
1723

1824
After each automation checkpoint, a pop-up window will ask the user questions for each verification command.

examples/tour_examples/ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class MyTourClass(BaseCase):
109109
self.add_tour_step("Type in your query here.", 'input[title="Search"]')
110110
self.play_tour()
111111

112-
self.highlight_update_text('input[title="Search"]', "Google")
112+
self.highlight_type('input[title="Search"]', "Google")
113113
self.wait_for_element('[role="listbox"]') # Wait for autocomplete
114114

115115
self.create_tour(theme="light")

help_docs/useful_grep_commands.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Useful <code>grep</code> commands</h2>
2+
3+
There are several useful **grep** commands for helping you find and/or replace text in multiple files. Examples:
4+
5+
#### List all files containing ``self.get_new_driver(``, ignoring ".pyc" files, from the current directory:
6+
7+
``grep -rl "self.get_new_driver(" * --exclude=\*.pyc``
8+
9+
OR
10+
11+
``grep -rl * -e "self.get_new_driver(" --exclude=\*.pyc``
12+
13+
--------
14+
15+
#### Replace all occurrences of "foo_abc" with "bar_xyz" on Linux, from the current directory:
16+
17+
``sed -i 's/foo_abc/bar_xyz/g' *``
18+
19+
#### Replace all occurrences of "foo_abc" with "bar_xyz" on macOS (file-backup required), from the current directory:
20+
21+
``sed -i '.bak' 's/foo_abc/bar_xyz/g' *``
22+
23+
--------
24+
25+
#### Find all chromedriver processes (this combines ``ps`` with ``grep``):
26+
27+
``ps -ef |grep chromedriver``
28+
29+
--------
30+
31+
#### References:
32+
* https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux
33+
* https://stackoverflow.com/questions/11392478/how-to-replace-a-string-in-multiple-files-in-linux-command-line/20721292#20721292

seleniumbase/masterqa/ReadMe.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44

55
![](https://seleniumbase.io/cdn/gif/masterqa6.gif "MasterQA")
66

7-
Here's example code from [basic_masterqa_test_0.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/basic_masterqa_test_0.py):
7+
Here's code from [basic_masterqa_test_0.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/basic_masterqa_test_0.py):
88

99
```python
10-
self.open("https://xkcd.com/1700/")
11-
self.verify("Do you see a webcomic?")
12-
self.highlight_click('link=Blag')
13-
self.verify('Do you see a blog archive?')
14-
self.highlight_update_text("input#s", "Dragons\n")
15-
self.verify('Do you see "dragons" in the search results?')
10+
from seleniumbase import MasterQA
11+
12+
class MasterQATests(MasterQA):
13+
def test_masterqa(self):
14+
self.open("https://xkcd.com/1700/")
15+
self.verify("Do you see a webcomic?")
16+
self.open("https://seleniumbase.io/demo_page")
17+
self.highlight('table')
18+
self.verify("Do you see elements in a table?")
19+
self.open("https://seleniumbase.io/devices/")
20+
self.highlight("div.mockup-wrapper")
21+
self.verify("Do you see 4 computer devices?")
1622
```
1723

1824
After each automation checkpoint, a pop-up window will ask the user questions for each verification command.

0 commit comments

Comments
 (0)