lundi 4 février 2019

Unable to locate elemet - Selenium

I try to get the element using cssSelector, but always got an error : Unable to Locate the Element. Any advice? Kindly help! You can refer to my code Thanks a lot!

driver.switchTo().frame("contentViewInsertDialog_ctl00_ctl00_contentView_frontendPagesCreate_ctl00_ctl00_sections_mainSection_0_ctl00_0_ctl00_0_fields_0_PagesNameFieldControl_0_ctl00_0_ctl00_0_textBox_write_0");


driver.findElement(By.cssSelector("#contentViewInsertDialog$ctl00$ctl00$contentView$frontendPagesCreate$ctl00$ctl00$sections$ctl00$mainSection$ctl00$ctl00$fields$ctl01$PagesNameFieldControl$ctl00$ctl00$textBox_write")).sendKeys("Testing Page for CWP Testing");

Aucun commentaire:

Enregistrer un commentaire