D
D
d3coy_002020-02-16 00:34:05
Python
d3coy_00, 2020-02-16 00:34:05

Python question (selenium / getattr)?

Hello, tell me how to get access via selenium to the attribute "contentEditable" from WebElement obtained by xpath:
5e48638fc0219890217660.png

I also do not quite understand how getattr works in this construction:

current_table = db.Table(table_n, metadata, autoload=True, autoload_with=engine)
            for i, column in enumerate(table_h):
                c = column.upper()
                query = db.select([current_table]).where(
                    getattr(current_table.columns, c) == table_i[0].split(';')[i])

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SvinkaBacilka, 2020-02-21
@SvinkaBacilka

As far as I understand .getattr() is a call to an attribute of an object, not a web element.
Try to find the web element you are interested in and access its attribute like this:
web_element.get_attribute('contentEditable')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question