diff --git a/README.md b/README.md index 20bd628426e..11d3cb428e1 100755 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ ### An open-source solution for reliable testing and business automation. #### Features include: -* Python wrappers for WebDriver to quickly create reliable scripts that run efficiently. -* Built-in Nosetest & Pytest plugins for logging test data, results, and screenshots. +* [Python wrappers](https://github.com/mdmintz/SeleniumBase/tree/master/seleniumbase/fixtures) for WebDriver to quickly create [reliable scripts](https://github.com/mdmintz/SeleniumBase/blob/master/examples/my_first_test.py) that run efficiently. +* Built-in [Nosetest & Pytest plugins](https://github.com/mdmintz/SeleniumBase/tree/master/seleniumbase/plugins) for logging [test data, results, and screenshots](https://github.com/mdmintz/SeleniumBase/tree/master/examples/logs_for_test_fail). * Simple integration with [Jenkins](http://jenkins-ci.org/), [Selenium Grid](http://docs.seleniumhq.org/projects/grid/), [MySQL](http://www.mysql.com/), [Docker](https://www.docker.com/), and [AWS](http://aws.amazon.com/). * Customizable with command-line options and a global config file: [settings.py](https://github.com/mdmintz/SeleniumBase/blob/master/seleniumbase/config/settings.py). -*Trusted by the world's most promising companies, including HubSpot, Jana, and Veracode. Learn how HubSpot uses SeleniumBase by reading: [Automated Testing with Selenium](http://dev.hubspot.com/blog/bid/88880/Automated-Integration-Testing-with-Selenium-at-HubSpot).* +*Trusted by the world's most promising companies, including [HubSpot](http://www.hubspot.com/), [Jana](http://jana.com/), and [Veracode](http://www.veracode.com/). Learn how HubSpot uses SeleniumBase by reading: [Automated Testing with Selenium](http://dev.hubspot.com/blog/bid/88880/Automated-Integration-Testing-with-Selenium-at-HubSpot).* ### Part I: MAC SETUP INSTRUCTIONS diff --git a/examples/logs_for_test_fail/ReadMe.txt b/examples/logs_for_test_fail/ReadMe.txt new file mode 100755 index 00000000000..e078a7273cb --- /dev/null +++ b/examples/logs_for_test_fail/ReadMe.txt @@ -0,0 +1,6 @@ +The log files you see here were generated when test_fail.py ran and failed. You can expect to see similar logs for your tests/scripts if they run and fail when you have logging turned on (usage: —-with-testing_base). See the main ReadMe.md for more details. (With nosetests, you’ll want to add each of the following options separately: -—with-screenshots, —-with-page_source, and —-with-basic_test_info. With pytest, you’ll only need —-with-testing_base to have all of those log options turned on.) + +Expected Log Files: +basic_test_info.txt +page_source.html +screenshot.jpg \ No newline at end of file diff --git a/examples/logs_for_test_fail/basic_test_info.txt b/examples/logs_for_test_fail/basic_test_info.txt new file mode 100644 index 00000000000..45b84673e04 --- /dev/null +++ b/examples/logs_for_test_fail/basic_test_info.txt @@ -0,0 +1,13 @@ +Last_Page: http://xkcd.com/731/ +Browser: firefox +Traceback: Traceback (most recent call last): + File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run + testMethod() + File "/Users/michael/github/SeleniumBase/examples/test_fail.py", line 11, in test_find_army_of_robots_on_xkcd_desert_island + self.wait_for_element_visible("div#ARMY_OF_ROBOTS", timeout=0.5) + File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/base_case.py", line 206, in wait_for_element_visible + self.driver, selector, by, timeout) + File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/page_actions.py", line 179, in wait_for_element_visible + "Element %s was not visible in %s seconds!" % (selector, timeout)) +ElementNotVisibleException: Message: Element div#ARMY_OF_ROBOTS was not visible in 0.5 seconds! + diff --git a/examples/logs_for_test_fail/page_source.html b/examples/logs_for_test_fail/page_source.html new file mode 100644 index 00000000000..55b6bf91683 --- /dev/null +++ b/examples/logs_for_test_fail/page_source.html @@ -0,0 +1,137 @@ + + + + +xkcd: Desert Island + + + + + + + + + + + +
+
+ +
+
+
+xkcd.com logo +A webcomic of romance,
sarcasm, math, and language.
+
+
+Thing Explainer is available at: Amazon, Barnes & Noble, Indie Bound, Hudson
+
+I'll be in Naperville, IL and Toronto, ON (with Ryan North!) next week. + +
+
+
+
+
+
+ +
Desert Island
+ +
+Desert Island +
+ +
+Permanent link to this comic: http://xkcd.com/731/
+Image URL (for hotlinking/embedding): http://imgs.xkcd.com/comics/desert_island.png + +
+
+
+
+
+
+Selected Comics + +Grownups +Circuit Diagram +Angular Momentum +Self-Description +Alternative Energy Revolution + +
+ +RSS Feed - Atom Feed +
+
+ +

Warning: this comic occasionally contains strong language (which may be unsuitable for children), unusual humor (which may be unsuitable for adults), and advanced mathematics (which may be unsuitable for liberal-arts majors).

+
BTC 1FhCLQK2ZXtCUQDtG98p6fVH7S6mxAsEey
We did not invent the algorithm. The algorithm consistently finds Jesus. The algorithm killed Jeeves.
The algorithm is banned in China. The algorithm is from Jersey. The algorithm constantly finds Jesus.
This is not the algorithm. This is close.
+
+

+This work is licensed under a +Creative Commons Attribution-NonCommercial 2.5 License. +

+This means you're free to copy and share these comics (but not to sell them). More details.

+
+
+ + + + + \ No newline at end of file diff --git a/examples/logs_for_test_fail/screenshot.jpg b/examples/logs_for_test_fail/screenshot.jpg new file mode 100644 index 00000000000..184469f7900 Binary files /dev/null and b/examples/logs_for_test_fail/screenshot.jpg differ