
[英]Adding to a collection from a popup modal with Backbone Marionette
[英]marionette not identifying thunderbird popup windows
我正在尝试为雷鸟插件编写自动化 UI 测试,我正在使用木偶 python 客户端。
我能够与主要的雷鸟 window 进行交互,但无法将上下文切换到 POP UP window。
例如
到目前为止,我尝试过的如下:
from marionette_harness import Marionette
from marionette_driver.by import By
client = Marionette(host='localhost', port=2828)
client.start_session()
with client.using_context(client.CONTEXT_CHROME):
calendar_icon = client.find_element(By.ID, "calendar-tab-button")
calendar_icon.click()
client.find_element(By.ID,"calendar-newevent-button").click()
handles = client.chrome_window_handles
#print len(handles)
for val in range(len(handles)):
print handles[val]
chrome_window_handles 只返回主 window 的句柄,而不是弹出窗口
想法是获取 window 句柄并使用 switch_to_window 方法
我是 python 和木偶的新手,找不到好的文档,我们将不胜感激。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.