【发布时间】:2020-07-30 00:29:07
【问题描述】:
你好, 在下面的应用程序中,CVV 在 iframe 中(如随附的屏幕截图所示),并且 iframe xpath 本质上是动态的。我尝试使用下面的 xpath,但由于数字不断变化,它失败了。你能帮忙看看如何处理这个动态 iframe xpath 吗?
//iframe[@id='cardinal-stepUpIframe-1586884117320']
【问题讨论】:
-
或
#stepUpView > div > iframe -
@Taplar 但 iframe 编号是动态的。
-
我的第一条评论和我的第二条评论都以选择器开头,根本不使用数字。
-
@Taplar- 我尝试了下面的 xpath - //iframe[contains(@id,'cardinal-stepUpIframe')]。希望它适用于我的自动化
标签: javascript java xpath iframe web-applications