1.在google中,可以开启多个窗口,这是需要切换到自己需要的窗口去定位元素。如下:
#获取两个窗口的标题
${titles} Selenium2Library.Get Window Titles
${titles2} Collections.Get From List ${titles} 1
${titles1} Collections.Get From List ${titles} 0
#切换到第二个窗口
Select Window title=${titles2}
1.在google中,可以开启多个窗口,这是需要切换到自己需要的窗口去定位元素。如下:
#获取两个窗口的标题
${titles} Selenium2Library.Get Window Titles
${titles2} Collections.Get From List ${titles} 1
${titles1} Collections.Get From List ${titles} 0
#切换到第二个窗口
Select Window title=${titles2}
转载于:https://www.cnblogs.com/1234abcdttttjy001/p/10607534.html