Skip to content

Releases: seleniumbase/SeleniumBase

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

Update parameterized version

08 Feb 06:08
a34e563
Compare
Choose a tag to compare

Update parameterized version:

  • Set parameterized>=0.7.0

Update examples

06 Feb 07:06
a7e8bd0
Compare
Choose a tag to compare

Mostly updating example tests to use a non-camelCase format for assertions.

  • self.assert_true() can now be used in place of self.assertTrue()
  • self.assert_equal() can now be used in place of self.assertEqual()

Save the URL with exported SeleniumBase tours

02 Feb 21:39
2cbeb72
Compare
Choose a tag to compare

Tour update:

  • Save the URL with exported SeleniumBase JavaScript tours