I have frame where id and name is same and I want to switch the frame. How can I do this?
This what I tried:
driver.switchTo().frame("iframe");
driver.switchTo().frame("clntcap_frame");
driver.switchTo().frame("//iframe[@id='clntcap_frame']");
HTML code
<iframe name="clntcap_frame" id="clntcap_frame" style="" xpath="1"></iframe>
In console:
Exception in thread "main" org.openqa.selenium.NoSuchFrameException: No frame element found by name or id iframe