本处的点击,主要记录了一些在Robot Framework框架下的一些点击操作。
Selenium2Libary的点击 Click Element 、 Mouse Down 用来模拟页面的点击,还有直接触发js进行点击。
Click Element xpath=//div[@id='plandiv_dayTimePlan0']/div
Focus xpath=//div[@id='plandiv_dayTimePlan0']/div
SWTA.Mouse Down xpath=//div[@id='plandiv_dayTimePlan0']/div
Execute Javascript $("#plandiv_timeTipHover").click();
AutoIt库,在Robot Framework框架下也有对应的库,它操作的对象,主要是windows视窗的对象,常见的选择文件界面。
Wait For Active Window [Class:IEFrame]
${ie_x} Win Get Pos X [Class:IEFrame]
${ie_y} Win Get Pos X [Class:IEFrame]#基础函数点击
Wait For Active Window [Class:IEFrame]
Mouse Click LEFT 570 57
Mouse Click LEFT 570 57
AutoItLibrary.Mouse DownComment Mouse Click -585 -73
Mouse Click 585 -73
Comment ${dom_x} Execute Javascript var x,y; \ \ var e=document.getElementById("plandiv_dayTimePlan0"); x = e.offsetWidth; \ \ y = e.offsetTop;return x;
Comment ${dom_y} Execute Javascript var x,y; \ \ var e=document.getElementById("plandiv_dayTimePlan0"); x = e.offsetWidth; \ \ y = e.offsetTop;return y;