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
You can override the default wait time by either updating [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) or by using ``--demo_sleep={NUM}`` when using Demo Mode. (NOTE: If you use ``--demo_sleep={NUM}`` without using ``--demo_mode``, nothing will happen.)
114
114
115
-
If you ever make any changes to your local copy of ``settings.py``, you may need to run ``python setup.py develop`` for those changes to take effect.
(NOTE: If you're using **pytest** instead of nosetests for running tests outside of the SeleniumBase repo, **you'll need a copy of [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/pytest.ini) at the base of the new folder structure, already provided here.**
160
158
159
+
If you want to pass additional data from the command line to your tests, you can use ``--data=STRING``. Now inside your tests, you can use ``self.data`` to access that.
160
+
161
161
162
162
<aid="creating_visual_reports"></a>
163
163
### **Creating Visual Test Suite Reports:**
(NOTE: The short versions of this are ``self.find_text(TEXT, ELEMENT)`` and ``self.assert_text(TEXT, ELEMENT)``)
355
+
(NOTE: ``self.find_text(TEXT, ELEMENT)`` and ``self.wait_for_text(TEXT, ELEMENT)`` also do this. For backwords compatibility, older method names were kept, but the default timeout may be different.)
Copy file name to clipboardExpand all lines: examples/ReadMe.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Running SeleniumBase Scripts
2
2
3
-
(NOTE: If you didn't install SeleniumBase properly, these scripts won't work. Installation steps include "``pip install seleniumbase``" and/or "``python setup.py install``" from the top-level directory.)
3
+
(NOTE: If you didn't install SeleniumBase properly, these scripts won't work. Installation steps include "``pip install seleniumbase``" and/or "``python setup.py develop``" from the top-level directory.)
4
4
5
5
To makes things easier, here's a simple GUI program that allows you to kick off a few example scripts by pressing a button:
6
6
@@ -14,7 +14,7 @@ python gui_test_runner.py
14
14
15
15

16
16
17
-
If you run scripts with logging enabled, (using ``--with-testing_base``), you’ll see two folders appear: “latest_logs” and “archived_logs”. The “latest_logs” folder will contain log files from the most recent test run, but logs will only be created if the test run is failing. Afterwards, logs from the “latest_logs” folder will get pushed to the “archived_logs” folder if you have have the ``ARCHIVE_EXISTING_LOGS`` feature enabled in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py). Make sure to run ``python setup.py install`` for your changes to take effect if you make any changes to that file.
17
+
If you run scripts with logging enabled, (using ``--with-testing_base``), you’ll see two folders appear: “latest_logs” and “archived_logs”. The “latest_logs” folder will contain log files from the most recent test run, but logs will only be created if the test run is failing. Afterwards, logs from the “latest_logs” folder will get pushed to the “archived_logs” folder if you have have the ``ARCHIVE_EXISTING_LOGS`` feature enabled in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py).
18
18
19
19
**For running scripts the usual way, here are some of the example run commands:**
#### Step 12. Install SeleniumBase (Make sure you already installed the requirements above)
77
77
78
78
```bash
79
-
sudo python server_setup.py install
79
+
sudo python server_setup.py develop
80
80
```
81
81
82
82
#### Step 13. Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) in Chrome to verify installation (Takes ~10 seconds)
@@ -146,31 +146,31 @@ If you have a web application that you want to test, you'll be able to create Se
146
146
* Give the instance a zone
147
147
* Click "Create"
148
148
149
-
#### Step 22. Get the Connection credentials for your new MySQL DB
149
+
#### Step 22. Get the Connection credentials for your new MySQL Instance
150
150
151
151
* Under the Google Cloud Platform menu, go to "Compute Engine"
152
152
* Find your new MySQL instance and then write down the value written in the "External IP" section.
153
153
* Under the Google Cloud Platform menu, go to "Deployment Manager"
154
154
* Find your new MySQL instance and then click on it.
155
155
* Write down the values for Admin username and password. (Username should be "root")
156
156
157
-
#### Step 23. Get a MySQL GUI tool so that you can connect to your MySQL DB
157
+
#### Step 23. Get a MySQL GUI tool so that you can connect to your MySQL Instance
158
158
159
159
* You can download [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/) for this.
160
160
161
-
#### Step 24. Create a new connection to your MySQL DB
161
+
#### Step 24. Create a new connection to your MySQL Instance
162
162
163
163
* Use the MySQL DB credentials that you saved in Step 21 for this.
164
164
165
-
#### Step 25. Create a new schema in your MySQL DB
165
+
#### Step 25. Create a new database/schema in your MySQL Instance
166
166
167
-
* You can name your schema ``test``.
167
+
* You can name your database/schema ``test_db``.
168
168
169
-
#### Step 26. Create the necessary tables in your MySQL schema
169
+
#### Step 26. Create the necessary tables in your MySQL database/schema
170
170
171
-
* Run a SQL script in your MySQL schema using [testcaserepository.sql](https://raw.githubusercontent.com/seleniumbase/SeleniumBase/master/seleniumbase/core/testcaserepository.sql)
171
+
* Run a SQL script in your MySQL database/schema using [testcaserepository.sql](https://raw.githubusercontent.com/seleniumbase/SeleniumBase/master/seleniumbase/core/testcaserepository.sql)
172
172
173
-
#### Step 27. Have your local clone of SeleniumBase connect to your MySQL DB
173
+
#### Step 27. Have your local clone of SeleniumBase connect to your MySQL Instance
174
174
175
175
* Update the MySQL connection details in your [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) file to use the credentials that you saved in Step 21.
176
176
* Run the following command again from the top-level SeleniumBase folder to make sure that SeleniumBase uses the updated credentials:
@@ -179,7 +179,7 @@ If you have a web application that you want to test, you'll be able to create Se
179
179
sudo python setup.py install
180
180
```
181
181
182
-
#### Step 28. Have your SeleniumBase Jenkins jobs use your MySQL DB
182
+
#### Step 28. Have your SeleniumBase Jenkins jobs use your MySQL Instance
183
183
184
184
* For the "Execute shell", use the following as your updated "Command":
0 commit comments