nhsuk / ui-test-core

Python package which helps with writing UI tests by providing a wrapper around Selenium and other useful functions
MIT License
12 stars 6 forks source link

[Feature] browser_handler should work without the Behave context #10

Open talawson05 opened 5 years ago

talawson05 commented 5 years ago

Is your feature request related to a problem? Please describe. If I'm not using Behave, I'm not able to use the browser_handler utility as the prepare_browser and it's subsequent methods all use the context.

Describe the solution you'd like I'd like to see the browser_handler methods only ask for the parameters it needs to work, not rely on the catch all context variable used in the Behave framework

Describe alternatives you've considered None

Additional context I'd like to use this module with any test runner; such as pytest, nose, or lettuce

Phil-87 commented 5 years ago

Closed #23 as it was a duplicate of this issue. Description of duplicate issue:

The context object came from the NHS.UK tests which use Behave, but UiTestCore could be used by any other test pack so it doesn't make sense to use this object which is too closely coupled to a particular test pack. This change would require the config_handler to be moved back into the test packs, and any code using "context" would need to be refactored.