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

'For_element_to_have attribute' method bug fix #41

Closed abennell closed 1 year ago

abennell commented 1 year ago

Description

If you use the 'for_element_to_have_attribute' method in waiter.py in your tests, and the element with the expected attribute and value is found in the DOM, an exception will be thrown. This exception occurs when the logger attempts to write the log message on line 78. This is because it's trying to pass in more args to the string formattr than you have placeholders in the string; the final placeholder being $s rather than %s

I have also added the missing dependency to the unittesting.md file.

Related Issue

https://github.com/nhsuk/ui-test-core/issues/40

Motivation and Context

Resolves a bug, allowing use of this method in our tests.

Checklist