Home > OS >  Cannot get Selenium to access a certain class
Cannot get Selenium to access a certain class

Time:12-09

I am just working with Selenium to automate some simple tasks at work. I am unable to get it to access this class:

<a href="javascript:openInIFrame('iamain', 'company_migration.phtml?.sess=Zcv4vINlw4RYZSvCGO7K_wW_hFllTmXLo2dmelAVWGUrwhjuyvEYo4RY&.ifmod=co&.done=Y5F7ZfgEOSSVJqglLXtQhgAAAAw28&eSecReq=S0VZX1NFQzpDUENvc2xicXhiYlN6Z1UxL280SjBjYjR0UW1yZ2xVOHFTRU1PQTRjVi9rPQ..&.op=258&amp;.menuItemRefNo=0')">Import data</a>

This is the code I am using `

driver.find_element(By.CSS_SELECTOR, '.qx-nav-name.qx-nav-ellipsis').click()

`

CodePudding user response:

Try using below code

driver.find_element(By.Link_Text, 'Import data').click()
  • Related