How to identify and switch to the frame in selenium webdriver when frame does not have id

0
0

Can anyone tell me how I can identify and switch to the iframe which has only a title?

<iframe frameborder="0" style="border: 0px none; width: 100%; height: 356px; min-width: 0px; min-height: 0px; overflow: auto;" dojoattachpoint="frame" title="Fill Quote" src="https://tssstrpms501.corp.trelleborg.com:12001/teamworks/process.lsw?zWorkflowState=1&zTaskId=4581&zResetContext=true&coachDebugTrace=none">

I have tried by below code but it is not working

driver.switchTo().frame(driver.findElement(By.tagName("iframe")));
  • You must to post comments
0
0

you can use cssSelector,

driver.switchTo().frame(driver.findElement(By.cssSelector("iframe[title='Fill Quote']")));
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website