python - 无法在 div 中切换到 iframe
问题描述
我是 Python 新手。我正在尝试切换到div (arvfframe) 内的 iframe。我用谷歌搜索了如何切换到单独的 iframe 并且可以做到。但这是 div 中的 iframe(请参阅 html 了解详细信息)。
<div id="WIN_1_304273010" arid="304273010" artype="Display" ardbn="z2DVF_QuestionHolder" arcontainerid="304272670" arpercentwidth="100" arpercentheight="100" class="arfid304273010 ardbnz2DVF_QuestionHolder" style="top: auto; left: auto; width: 780px; height: 445px; z-index: 1046; background-color: transparent; min-width: 20px; max-width: 32767px; min-height: 20px; max-height: 32767px; position: relative; overflow: hidden;" arvfframe="<iframe style="top:0px&#59; left:0px&#59; width:782px&#59; height:438px&#59;background-color: transparent&#59;" name="VF304273010" frameborder=0 scrolling="auto" allowtransparency="true" arviewbordercolor="null" title="Question Holder" src="javascript:&quot;&lt;HTML&gt;&lt;/HTML&gt;&quot;" onload="DVFol&#40;&#41;">
</iframe>" arwindowid="1" arstop="0">
切换到没有 div 的 iframe 更容易(我还附上了 html)。但它是一个动态 iframe,每次重新加载页面时 ID 都会更改,因此我无法通过 ID 获取元素。如果您能建议如何处理动态 iframe,我会非常感激。
<iframe style="top:0px; left:0px; width:100%; height:100%;background-color: transparent;" name="VF304273010_1633252952042IF_1" id="VF304273010_1633252952042IF_1" frameborder="0" scrolling="auto" allowtransparency="true" arviewbordercolor="null" title="Question Holder" src="javascript:"<HTML></HTML>"" onload="F(1,304273010).ol()">
</iframe>
</div>
解决方案
推荐阅读
- c# - 我可以避免找不到此成员吗?(来自 HRESULT 的异常:0x80020003 (DISP_E_MEMBERNOTFOUND))?
- java - 在 JAVA 中执行代码块时出现问题,第一次单击时代码未完全运行
- sqlite - 高效地将一个 SQLite 数据库拆分为多个文件
- flutter - 颤振 admob 移除后退按钮
- python - 使用 4D 数据进行 Python 缩放
- reactjs - React Hook - 仅在组件卸载时使用效果,而不是在依赖项更新时使用
- r - 在R中合并具有不同行的两个数据框
- ubuntu - Tomcat:/etc/init.d/tomcat 不存在且 monit 不起作用
- text - 是否可以在光标位置下方写文字
- c# - .net core 2.2 会话注销