I have the following code:
el = browser.find_element(By.CSS_SELECTOR('div.iconTabSheet95_0.PPTSPicture'))
When I try to run it, I get the following error:
File "C:\Users\belkina\source\repos\try_ros\try_ros\try.py", line 25, in <module>
el = browser.find_element(By.CSS_SELECTOR('div.iconTabSheet95_0.PPTSPicture'))
TypeError: 'str' object is not callable
When I try to search for an element on a page using a selector, I find it:
Why isn’t my code working?
Answer 1, authority 100%
Change the line:
el = browser.find_element(By.CSS_SELECTOR('div.iconTabSheet95_0.PPTSPicture'))
To:
el = browser.find_element_by_css_selector('div.iconTabSheet95_0.PPTSPicture')