Skip to content

Commit 5f3e4dc

Browse files
authored
Merge pull request #295 from seleniumbase/tours-update
Save exported website tours to the "tours_exported" folder
2 parents 419e4c5 + f221fbf commit 5f3e4dc

File tree

12 files changed

+30
-9
lines changed

12 files changed

+30
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ archived_reports
6262
html_report.html
6363
report.html
6464

65+
# Tours
66+
tours_exported
67+
6568
# Other
6669
selenium-server-standalone.jar
6770
proxy.zip

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ self.get_page_source() # This method returns the current page source.
447447
Ex:
448448
```python
449449
source = self.get_page_source()
450-
first_image_open_tag = source.find('<img>')
451-
first_image_close_tag = source.find'</img>', first_image_open_tag)
452-
everything_inside_first_image_tags = source[first_image_open_tag+len('<img>'):first_image_close_tag]
450+
head_open_tag = source.find('<head>')
451+
head_close_tag = source.find('</head>', head_open_tag)
452+
everything_inside_head = source[head_open_tag+len('<head>'):head_close_tag]
453453
```
454454

455455
#### Clicking

examples/tour_examples/bootstrap_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ def test_google_tour(self):
6262
self.add_tour_step(
6363
"Thanks for trying out SeleniumBase Tours!",
6464
title="End of Guided Tour")
65+
self.export_tour(filename="bootstrap_google_maps_tour.js")
6566
self.play_tour()

examples/tour_examples/google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ def test_google_tour(self):
7171
self.add_tour_step(
7272
"Thanks for trying out SeleniumBase Tours!",
7373
title="End of Guided Tour")
74+
self.export_tour()
7475
self.play_tour()

examples/tour_examples/hopscotch_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ def test_google_tour(self):
6363
self.add_tour_step(
6464
"Thanks for trying out SeleniumBase Tours!",
6565
title="End of Guided Tour")
66+
self.export_tour(filename="hopscotch_google_maps_tour.js")
6667
self.play_tour()

examples/tour_examples/introjs_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ def test_google_tour(self):
6262
self.add_tour_step(
6363
"Thanks for trying out SeleniumBase Tours!",
6464
title="End of Guided Tour")
65+
self.export_tour(filename="introjs_google_maps_tour.js")
6566
self.play_tour()

examples/tour_examples/shepherd_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ def test_google_tour(self):
6666
self.add_tour_step(
6767
"Thanks for trying out SeleniumBase Tours!",
6868
title="End of Guided Tour", theme="light")
69+
self.export_tour(filename="shepherd_google_maps_tour.js")
6970
self.play_tour()

examples/tour_examples/xkcd_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ def test_basic(self):
1818
self.add_tour_step("This selects a random comic.", 'a[href*="random"]')
1919
self.add_tour_step("Thanks for taking this tour!")
2020
# self.export_tour() # Use this to export the tour as [my_tour.js]
21+
self.export_tour(filename="xkcd_tour.js") # You can customize the name
2122
self.play_tour()

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ beautifulsoup4>=4.6.0
1818
colorama==0.4.1
1919
pyotp>=2.2.7
2020
boto>=2.49.0
21-
flake8==3.7.6
21+
flake8==3.7.7
2222
PyVirtualDisplay==0.2.1
2323
-e .

seleniumbase/config/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
BASIC_INFO_NAME = "basic_test_info.txt"
3232
PAGE_SOURCE_NAME = "page_source.html"
3333

34-
# Default names for folders and files saved when reports are turned on.
35-
# Usage: "--report" and "--with-testing_base" together. (NOSETESTS only)
34+
# Default names for files and folders saved when using nosetests reports.
35+
# Usage: "--report". (NOSETESTS only)
3636
LATEST_REPORT_DIR = "latest_report"
3737
REPORT_ARCHIVE_DIR = "archived_reports"
3838
HTML_REPORT = "report.html"

0 commit comments

Comments
 (0)