Search code examples
python-3.xseleniumselenium-webdriverbrowser-automation

How To Click On Lock Image File Using Selenium Python


I want to click on two images i.e Files from Studio and Files to Studio provided in attachment for reference. I tried multiple ways as using JavaScript,Action Class but i am not able to click on both options i.e Files From Studio and Files To Studio.

Before Click the image is locked as we click the file image icon gets open. same for files to studio.

Can you please help me with solution of how i can click the Files From Studio and Files To Studio.

PFA of images with code present in console.

Thanks In Advance !!!

enter image description here enter image description here


Solution

  • Try with javascript:

    userName = driver.find_element_by_xpath("//span[text()='Files to Studio']")
    driver.execute_script("arguments[0].click();", userName)