I want to check the value of an attribute that is present in an element.
I have the following Python code:
validkey = False
# Was the key valid.
element = w.find_element_by_id('registerkey_form')
# Is the activation message is shown, meaning it was successful in activation.
if element.get_attribute('style'):
validkey = True
The problem is the second last line. I want to check for:
style="display:block;"
not just the existence of style itself but the value as well.
Originally it is:
style="display:none;"
I want to check if it is "block".