Hey! Yeah, `get_attribute()` is the way to go, but checking for `None` is kinda the standard approach.
If you want something cleaner, you could wrap it in a helper function like:
```python
def has_attribute(element, attr_name):
return element.get_attribute(attr_name) is not None
```
Not built-in, but saves you from repeating the `None` check everywhere.
For webelement has attribute python, this is pretty much the simplest solution unless you dig into JS execution, which is overkill.
If you want something cleaner, you could wrap it in a helper function like:
```python
def has_attribute(element, attr_name):
return element.get_attribute(attr_name) is not None
```
Not built-in, but saves you from repeating the `None` check everywhere.
For webelement has attribute python, this is pretty much the simplest solution unless you dig into JS execution, which is overkill.
