Skip to content

Commit 5e86e9e

Browse files
committed
Update the SeleniumBase Tours ReadMe
1 parent 6e90318 commit 5e86e9e

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ cd tour_examples
6060
pytest google_tour.py
6161
```
6262

63-
![](https://cdn2.hubspot.net/hubfs/100006/images/google_tour.gif "SeleniumBase Tours")<br />
63+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/google_tour.gif" title="SeleniumBase Tours" height="348"><br>
6464
(Above: Actual demo of [google_tour.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/google_tour.py) running on [google.com](https://google.com))
6565

6666
For more detailed steps on getting started, see the [**Detailed Instructions**](#seleniumbase_installation) section.

examples/tour_examples/ReadMe.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
11
## Creating SeleniumBase Tours
22

3-
![](https://cdn2.hubspot.net/hubfs/100006/images/google_tour.gif "SeleniumBase Tours")<br>
3+
SeleniumBase Tours utilize the **[Shepherd Javascript Library](https://cdnjs.com/libraries/shepherd/1.8.1)** and the **[Bootstrap Tour Library](https://cdnjs.com/libraries/bootstrap-tour)** for creating and running tours, demos, and walkthroughs on any website.
44

5-
SeleniumBase Tours utilize the [Shepherd Javascript Library](https://cdnjs.com/libraries/shepherd/1.8.1) for creating and running tours, demos, and walkthroughs on any website.
5+
Example tour utilizing the Shepherd Javascript Library:
66

7-
To utilize tours, there are three methods that you need to know at the basic level (which contain optional arguments):
7+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/google_tour.gif" title="Shepherd Tour" height="348"><br>
88

9-
``self.create_tour(theme)``
9+
Example tour utilizing the Bootstrap Javascript Library:
10+
11+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/google_tour_2.gif" title="Bootstrap Tour" height="340"><br>
12+
13+
By default, the Shepherd Javascript Library is used when creating a tour with:
14+
15+
``self.create_tour()``
16+
17+
To create a tour utilizing the Bootstrap Javascript Library, you can use either of the following:
18+
19+
``self.create_bootstrap_tour()``
20+
21+
OR
22+
23+
``self.create_tour(theme="bootstrap")``
24+
25+
To add a tour step, use the following: (Only ``message`` is required. The other args are optional.)
1026

1127
``self.add_tour_step(message, css_selector, title, alignment, theme)``
1228

29+
Here's how you play a tour:
30+
1331
``self.play_tour(interval)``
1432

1533
With the ``create_tour()`` method, you can pass a default theme to change the look & feel of the tour steps. Valid themes are ``dark``, ``default``, ``arrows``, ``square``, and ``square-dark``.
@@ -18,6 +36,8 @@ With the ``self.add_tour_step()`` method, you must first pass a message to displ
1836

1937
Finally, you can play a tour you created by calling the ``self.play_tour()`` method. If you specify an interval, the tour will automatically walk through each step after that many seconds have passed.
2038

39+
All methods have the optional ``name`` argument, which is only needed if you're creating multiple tours at once. Then, when you're adding a step or playing a tour, SeleniumBase knows which tour you're referring too. You can avoid using the ``name`` arg for multiple tours if you play a tour before creating a new one.
40+
2141
### Here's an example of using SeleniumBase Tours:
2242

2343
```python
@@ -44,3 +64,9 @@ class MyTourClass(BaseCase):
4464
```bash
4565
pytest google_tour.py
4666
```
67+
68+
#### There's also the Bootstrap Google Tour, which you can play with the following command:
69+
70+
```bash
71+
pytest bootstrap_google_tour.py
72+
```

0 commit comments

Comments
 (0)