<iframe height="0" frameborder="0" width="500" scrolling="no" style="position: absolute; top: 185.5px; left: 460.5px; height: 357px; width: 500px; z-index: 10002; border: medium none; background-color: rgb(255, 255, 255); opacity: 0;" src="/foresee/shim.gif" alt="Survey Invitation Helper Window - Please Ignore">
<html>
<head>
<meta name="viewport" content="width=device-width; height=device-height;">
<style>
<title>shim.gif (GIF Image, 1 × 1 pixels)</title>
</head>
<body>
<img src="https://www3-qan.tivo.com/foresee/shim.gif" alt="https://www3-qan.tivo.com/foresee/shim.gif">
</body>
</html>
</iframe>
<div class="fsrwin" style="position: absolute; width: 500px; z-index: 10005; left: 460.5px; top: 185.5px; opacity: 1;">
<div class="innerwin">
<div class="fsr_top">
<div class="fsr_middle">
<div class="fsr_closeBody fsr_closeButtons">
<button id="decline" class="fsr_closeSticky fsr_button fsr_decline">No thanks</button>
<button id="accept" class="fsr_closeSticky fsr_button fsr_accept">Yes, I'll give feedback</button>
</div>
我知道我应该切换到框架以执行框架中的任何操作。
我的问题是:
如何切换到框架?(我无法找出在 switch 语句中使用的正确定位器(driver.switchto().frame("WHAT SHOULD GO IN HERE")))?
当我每次导航到新页面时,有没有办法检查这个框架是否存在?
非常感谢您的帮助.... 迈克