Skip to content

Releases: seleniumbase/SeleniumBase

Add a command-line option to archive old log files rather than deleting them

05 Mar 06:09
eff91bd
Compare
Choose a tag to compare

Add a command-line option to archive old log files rather than deleting them.

If the option is set, log files from the latest_logs folder will get moved to the archived_logs folder for storage. Otherwise, any existing logs in the latest_logs folder will be deleted at the start of the next test run.

Usage: (on the command line when running tests)

  • --archive_logs

Add the ability to save screenshots at the end of tests

05 Mar 04:44
cb9a2d2
Compare
Choose a tag to compare

Add the ability to save screenshots at the end of tests.
This adds the feature for passing tests. (This feature already existed for failing tests automatically.)
Check the latest_logs folder for the images.

Usage: (on the command line when running tests)

  • --save_screenshot

The screenshot will be taken right before the browser is closed.

Add "limit" argument to methods that return or click multiple elements

03 Mar 06:22
6d5769b
Compare
Choose a tag to compare

Add "limit" argument to methods that return or click multiple elements.
Updated methods: ("0" means no limit)

  • self.find_elements(selector, by=By.CSS_SELECTOR, limit=0)
  • self.find_visible_elements(selector, by=By.CSS_SELECTOR, limit=0)
  • self.click_visible_elements(selector, by=By.CSS_SELECTOR, limit=0)

Example:
self.click_visible_elements('[type="checkbox"]', limit=5)
(Click the first 5 visible checkboxes on a page)

Add the ability to set the User-Agent for the browser

28 Feb 10:07
9ee27eb
Compare
Choose a tag to compare

Add the ability to set the User-Agent for the browser:

  • Usage: --agent="USER-AGENT STRING"

Example:

pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"

Other changes:

  • Fix the Docker integration
  • Update console scripts for page-object manipulation
  • Update several ReadMe files

New console scripts for manipulating page objects

26 Feb 09:12
2496d17
Compare
Choose a tag to compare

New console scripts for manipulating page objects:

"seleniumbase" ...

+ "extract-objects"

  Usage:
           seleniumbase extract-objects [SELENIUMBASE_PYTHON_FILE]
  Output:
           Creates page objects based on selectors found in a
           seleniumbase Python file and saves those objects to the
           "page_objects.py" file in the same folder as the tests.

+ "inject-objects"

  Usage:
           seleniumbase inject-objects [SELENIUMBASE_PYTHON_FILE]
  Options:
           -c, --comments  (Add object selectors to the comments.)
                           (Default: No added comments.)
  Output:
           Takes the page objects found in the "page_objects.py"
           file and uses those to replace matching selectors in
           the selected seleniumbase Python file.

+ "objectify"

  Usage:
           seleniumbase objectify [SELENIUMBASE_PYTHON_FILE]
  Options:
           -c, --comments  (Add object selectors to the comments.)
                           (Default: No added comments.)
  Output:
           A modified version of the file where the selectors
           have been replaced with variable names defined in
           "page_objects.py", supporting the Page Object Pattern.

           (seleniumbase "objectify" has the same outcome as
            combining "extract-objects" with "inject-objects")

+ "revert-objects"

  Usage:
           seleniumbase revert-objects [SELENIUMBASE_PYTHON_FILE]
  Options:
           -c, --comments  (Keep existing comments for the lines.)
                           (Default: No comments are kept.)
  Output:
           Reverts the changes made by "seleniumbase objectify" or
           "seleniumbase inject-objects" when run against a
           seleniumbase Python file. Objects will get replaced by
           selectors stored in the "page_objects.py" file.

Update webdriver installation script

21 Feb 07:43
e5d594b
Compare
Choose a tag to compare

Update webdriver installation script:

  • seleniumbase install chromedriver will now install chromedriver v2.46, except on Linux machines, which may be using older versions of Chrome
  • seleniumbase install geckodriver will now install v0.24.0 (for Firefox)
  • seleniumbase install operadriver will now install v.2.40

Other changes:

  • Update starting browser dimensions

Update requirements

19 Feb 06:19
968701b
Compare
Choose a tag to compare

Update requirements:

  • Update pytest to v4.3.0

Clone an existing method with an additional name

16 Feb 17:53
fc3dca7
Compare
Choose a tag to compare

Clone an existing method with an additional name:

  • Add self.assert_element_visible(CSS_SELECTOR), which does the same thing as self.assert_element(CSS_SELECTOR).

Adding exact text methods and other improvements

15 Feb 07:43
6d11358
Compare
Choose a tag to compare

Adding exact text methods and other improvements:

  • Add self.assert_exact_text()
  • Add self.wait_for_exact_text_visible()
  • Update pytest version to 4.2.1
  • Adding more reliability to some methods
  • Fix a bug with text assertion

Fix Python 2 compatibility

12 Feb 04:31
f7272a9
Compare
Choose a tag to compare

Fix Python 2 compatibility:

  • Use more-itertools version >=5.0.0,<6.0.0