select window new
关于此命令,想请教下各路大神如何解决以下的问题?
点击 一个按钮弹出一个新窗口后,并等待了足够长的时间,但是会有一定的小概率 报如下的错误:
No new window at last index. Please use '@{ex}= | List Windows' + new window trigger + 'Select Window | ${ex}' to find it.
代码如下:click element xpath=//*[@name="formDevelop"]/table/tbody/tr/td[2]/div[2]/table[1]/tbody/tr[2]/td/table/tbody/tr/td/table/tbody/tr[2]/td[2]/input[1] #弹出新窗口
sleep 12
select window new
Wait Until Page Contains Element xpath=/html/body/form/table/tbody/tr/td[2]/table[2]/tbody/tr/td/table/tbody/tr/td[2]/input 120
改用 ( @{ex}= List Windows 与select window @{ex}[1]也有一定的错误概率)
代码如下:
click element xpath=//*[@name="formDevelop"]/table/tbody/tr/td[2]/div[2]/table[1]/tbody/tr[2]/td/table/tbody/tr/td/table/tbody/tr[2]/td[2]/input[1] #弹出新窗口
sleep 12
@{bb2} get window handles
select window @{bb2}[1]
log @{bb2}[2]
Wait Until Page Contains Element xpath=/html/body/form/table/tbody/tr/td[2]/table[2]/tbody/tr/td/table/tbody/tr/td[2]/input 120
改用 ( @{ex}= List Windows 与select window @{ex}[1]也有一定的错误概率)