Screenpy

Latest version: v4.2.4

Safety actively analyzes 628903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

3.0.3

------------------

Improvements

- (h/t bandophahita) CLI logging now has indentation levels to help show which statements are encapsulated by Questions, tasks, Actions, etc.!
- Reverted the `Protocol` import from `typing` back to `typing_extensions` for better compatibility. This will be revisited when Python 4 is released, probably.

New Features

- (h/t bandophahita) New **IsClickable** Resolution to check if an element is clickable!

3.0.2

------------------

Improvements

- **Wait** now only puts *one* "..." at the end of its messages. :eye_roll:
- `mypy` will now be looking at the `examples/` directory as well, so it can catch errors like...

Bugfixes

- (h/t bandophahita) Removed the **BaseAction**, **BaseAbility**, and **BaseQuestion** classes, for *sure* this time.
- `mypy` should no longer complain whenever you use any of the **SendMETHODRequest** API request Actions (e.g. **SendGETRequest**, **SendPOSTRequest**, etc.).

3.0.1

------------------

Improvements

- **Wait** can do custom log messages again, to make the reports look nicer.

Bug Fixes

- **Element** now catches the correct exception type, now that Target's the one doing the finding.
- **Wait** now formats its custom exception correctly.
- What's a release without some same-day bug fixes, right?

3.0.0

------------------

Breaking Changes

- **BrowseTheWeb** no longer has `.to_find()` or `.to_wait_for()`. I realized these methods actually break the S in SOLID, and these methods were limiting Actions from really doing what they're supposed to do. See the Improvements section below for the direct benefit of this change!

Improvements

- **Wait** can now use strategies that don't use a Target, or have multiple arguments. You can now use any of Selenium's URL-monitoring expected conditions or any other custom strategies through `Wait().using(strategy).with_("any", "number", "of", "args")`!
- **AddHeader** can now accept new forms of header-setting arguments, like a dict or just alternating pairs. Now `AddHeader(Cookie="yes=please")` == `AddHeader({"Cookie": "yes=please"})` == `AddHeader("Cookie", "yes=please")`!
- Added **SetHeaders** Action, if you want to set the headers *exactly* (and remove all unmentioned headers).
- **AddHeader**, **SetHeaders**, and **Send\[METHOD\]Request** Actions now all have a way to mark their contents as secret, so they won't be logged. Add a `.which_should_be_kept_secret()` or `.secretly()` to the end and the log won't mention the unmentionables.
- I did another docs overhaul, this time making them read in a way that might please [Hemingway](http://www.hemingwayapp.com/).

Bug Fixes

- **Click** is now able to be chained without a Target to click. This was preventing clicking at an offset, which annoyed *me* at least.

2.2.0

------------------

Improvements

- Updated all the dependencies to support Python 3.9! Kind of a boring update.
- Made the reported Actions more consistently worded.

2.1.0

------------------

Breaking Changes

- Removed `on_top` method from **SwitchToTab**, it wasn't consistent under certain circumstances and that could be misleading.
- Removed the **BaseAction**, **BaseAbility**, and **BaseQuestion** classes in favor of Protocols.

New Features

- Added API testing support!
- Added **MakeAPIRequests** Ability.
- Added **SendGETRequest**, **SendPOSTRequest**, **SendPATCHRequest**, **SendPUTRequest**, **SendOPTIONSRequest**, **SendHEADRequest**, **SendDELETERequest**, and **SendAPIRequest** Actions.
- Added **AddHeader**/**AddHeaders** Action.
- Added **Cookies**, **CookiesOnTheWebSession**, **CookiesOnTheAPISession** Questions.
- Added **StatusCodeOfTheLastResponse** Question.
- Added **BodyOfTheLastResponse** Question.
- Added **HeadersOfTheLastResponse** Question.
- Added **ContainsTheKey**, **ContainsTheValue**, **ContainsTheEntry** Resolutions.
- Added `should_see_any_of` assertion method to Actors, which is similar to `should_see_the` but passes if *at least* one of its tests are true, instead of all of them.
- Added **HasLength** Resolution, for fun.
- Added a "cookbook" section to the docs to give examples of common use-cases.

Improvements:

- *Huge* docs overhaul, aimed at reducing word count and increasing word value.
- Switched to using Protocols for type hinting instead of base classes.
- **IsVisible** Resolution now has a nicer mismatch message.

Bugfixes:

- Fixed a timing issue with **has_method_with_return_value** where the return value could change by the time the mismatch message was being written to the log, which made it look like a passing test was failing.
- Fixed `SwitchTo.default()` logging a very metaphysical "{The Actor} switches to the None".
- Fixed **Enter**'s logging when `then_hits` is used to hit a key without a nice text representation (like "Return").
- Fixed a small collection of copy/paste errors in documentation and logged strings.

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.