Use Chrome more than Firefox in test examples
This commit is contained in:
parent
55bb8ae5e0
commit
a86425cf75
10
README.md
10
README.md
|
@ -116,10 +116,10 @@ Here's how to run the example script using various web browsers:
|
|||
```bash
|
||||
cd examples/
|
||||
|
||||
nosetests my_first_test.py --with-selenium --browser=firefox -s
|
||||
|
||||
nosetests my_first_test.py --with-selenium --browser=chrome -s
|
||||
|
||||
nosetests my_first_test.py --with-selenium --browser=firefox -s
|
||||
|
||||
nosetests my_first_test.py --with-selenium --browser=phantomjs -s
|
||||
```
|
||||
|
||||
|
@ -139,7 +139,7 @@ If the example is moving too fast for your eyes to see what's going on, there ar
|
|||
You can add ``--demo_mode`` on the command line, which pauses the browser for about a second (by default) after each action:
|
||||
|
||||
```bash
|
||||
nosetests my_first_test.py --with-selenium -s --demo_mode
|
||||
nosetests my_first_test.py --with-selenium --browser=chrome -s --demo_mode
|
||||
```
|
||||
|
||||
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.)
|
||||
|
@ -147,7 +147,7 @@ You can override the default wait time by either updating [settings.py](https://
|
|||
If you ever make any changes to your local copy of ``settings.py``, you may need to run ``python setup.py install`` for those changes to take effect.
|
||||
|
||||
```bash
|
||||
nosetests my_first_test.py --with-selenium -s --demo_mode --demo_sleep=1.2
|
||||
nosetests my_first_test.py --with-selenium --browser=chrome -s --demo_mode --demo_sleep=1.2
|
||||
```
|
||||
|
||||
You can also add either of the following to your scripts to slow down the tests:
|
||||
|
@ -195,7 +195,7 @@ py.test my_first_test.py --with-selenium --with-testing_base --browser=phantomjs
|
|||
**Creating Visual Test Suite Reports** (for nosetest users *ONLY*): The ``--report`` option gives you a fancy report after your test suite completes. (Requires ``--with-testing_base`` to also be set when ``--report`` is used)
|
||||
|
||||
```bash
|
||||
nosetests my_test_suite.py --with-selenium --with-testing_base --report -s
|
||||
nosetests my_test_suite.py --with-selenium --browser=chrome --with-testing_base --report -s
|
||||
```
|
||||
![](http://cdn2.hubspot.net/hubfs/100006/images/Test_Report_2.png "Example Test Report")
|
||||
|
||||
|
|
|
@ -16,29 +16,30 @@ class App:
|
|||
self.label = Label(root, width=40).pack()
|
||||
self.title = Label(frame, text="", fg="black").pack()
|
||||
self.title1 = Label(
|
||||
frame, text="Basic Test Run in Firefox:", fg="blue").pack()
|
||||
frame, text="Basic Test Run in Chrome:", fg="blue").pack()
|
||||
self.run1 = Button(
|
||||
frame, command=self.run_1,
|
||||
text="nosetests my_first_test.py --with-selenium").pack()
|
||||
text=("nosetests my_first_test.py --with-selenium"
|
||||
" --browser=chrome")).pack()
|
||||
self.title2 = Label(
|
||||
frame, text="Basic Test Run in Chrome:", fg="blue").pack()
|
||||
frame, text="Basic Test Run in Firefox:", fg="blue").pack()
|
||||
self.run2 = Button(
|
||||
frame, command=self.run_2,
|
||||
text=("nosetests my_first_test.py"
|
||||
" --with-selenium --browser=chrome")).pack()
|
||||
" --with-selenium --browser=firefox")).pack()
|
||||
self.title3 = Label(
|
||||
frame, text="Basic Test Run in Demo Mode:", fg="blue").pack()
|
||||
self.run3 = Button(
|
||||
frame, command=self.run_3,
|
||||
text=("nosetests my_first_test.py"
|
||||
" --with-selenium --demo_mode")).pack()
|
||||
" --with-selenium --browser=chrome --demo_mode")).pack()
|
||||
self.title4 = Label(
|
||||
frame,
|
||||
text="Basic Failing Test Run with Screenshots:",
|
||||
fg="blue").pack()
|
||||
self.run4 = Button(
|
||||
frame, command=self.run_4,
|
||||
text=("nosetests test_fail.py --with-selenium"
|
||||
text=("nosetests test_fail.py --with-selenium --browser=chrome"
|
||||
" --with-testing_base --demo_mode")).pack()
|
||||
self.title5 = Label(
|
||||
frame,
|
||||
|
@ -47,7 +48,7 @@ class App:
|
|||
self.run5 = Button(
|
||||
frame, command=self.run_5,
|
||||
text=("nosetests my_test_suite.py --with-selenium"
|
||||
" --with-testing_base --report")).pack()
|
||||
" --browser=chrome --with-testing_base --report")).pack()
|
||||
self.title6 = Label(
|
||||
frame,
|
||||
text="Basic Failing Test Run showing the Multiple-Checks feature:",
|
||||
|
@ -55,7 +56,7 @@ class App:
|
|||
self.run6 = Button(
|
||||
frame, command=self.run_6,
|
||||
text=("nosetests non_terminating_checks_test.py"
|
||||
" --with-selenium")).pack()
|
||||
" --browser=chrome --with-selenium")).pack()
|
||||
self.title7 = Label(
|
||||
frame,
|
||||
text="MySQL DB Reporting Tests: (See ReadMe.md for Setup Steps!)",
|
||||
|
@ -63,42 +64,45 @@ class App:
|
|||
self.run7 = Button(
|
||||
frame, command=self.run_7,
|
||||
text=("nosetests my_test_suite.py --with-selenium"
|
||||
" --with-db_reporting")).pack()
|
||||
" --browser=chrome --with-db_reporting")).pack()
|
||||
self.end_title = Label(frame, text="", fg="black").pack()
|
||||
self.quit = Button(frame, text="QUIT", command=frame.quit).pack()
|
||||
|
||||
def run_1(self):
|
||||
os.system(
|
||||
'nosetests my_first_test.py --with-selenium')
|
||||
'nosetests my_first_test.py --with-selenium --browser=chrome')
|
||||
|
||||
def run_2(self):
|
||||
os.system(
|
||||
'nosetests my_first_test.py --with-selenium --browser=chrome')
|
||||
'nosetests my_first_test.py --with-selenium --browser=firefox')
|
||||
|
||||
def run_3(self):
|
||||
os.system(
|
||||
'nosetests my_first_test.py --with-selenium --demo_mode')
|
||||
'nosetests my_first_test.py --with-selenium --demo_mode'
|
||||
' --browser=chrome')
|
||||
|
||||
def run_4(self):
|
||||
os.system(
|
||||
'nosetests test_fail.py --with-selenium'
|
||||
' --with-testing_base --demo_mode')
|
||||
' --browser=chrome --with-testing_base --demo_mode')
|
||||
|
||||
def run_5(self):
|
||||
os.system(
|
||||
'nosetests my_test_suite.py --with-selenium'
|
||||
' --with-testing_base --report')
|
||||
' --browser=chrome --with-testing_base --report')
|
||||
|
||||
def run_6(self):
|
||||
os.system(
|
||||
'nosetests non_terminating_checks_test.py --with-selenium')
|
||||
'nosetests non_terminating_checks_test.py --with-selenium'
|
||||
' --browser=chrome')
|
||||
|
||||
def run_7(self):
|
||||
os.system(
|
||||
'nosetests my_test_suite.py --with-selenium --with-db_reporting')
|
||||
'nosetests my_test_suite.py --with-selenium'
|
||||
' --browser=chrome --with-db_reporting')
|
||||
|
||||
if __name__ == "__main__":
|
||||
root = Tk()
|
||||
root.minsize(584, 444)
|
||||
root.minsize(612, 444)
|
||||
app = App(root)
|
||||
root.mainloop()
|
||||
|
|
Loading…
Reference in New Issue