How To Change The Text Of A Span That Acts Like A Button
I am working on writing automation tests for a custom web application. I am running into a problem where I can't change the text of a span. I have tried using driver.execute_scri
Solution 1:
You need to set the innerHTML using execute_script():
driver.execute_script('arguments[0].innerHTML = "New value";', element)
where element should point to your span element, could be:
element = driver.find_element_by_css_selector('div.file-wrapper span.k-dropdown span.k-input')
Post a Comment for "How To Change The Text Of A Span That Acts Like A Button"