Reputation: 87
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 !!!
Upvotes: 0
Views: 281
Reputation: 125
Try with javascript:
userName = driver.find_element_by_xpath("//span[text()='Files to Studio']")
driver.execute_script("arguments[0].click();", userName)
Upvotes: 1
Reputation: 29362
Did you try with
//span[text()='Files to Studio']
xpath ?
like :
wait = WebDriverWait(driver, 10)
wait.until(EC.element_to_be_clickable((By.XPATH, "//span[text()='Files to Studio']"))).click()
Imports :
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
You can try the same for Files from Studio
, like //span[text()='Files from Studio']
Upvotes: 1