Sikuli 代码,用于在 Silverlight 应用程序中滚动到页面末尾



我正在研究自动化一个 silverlight 应用程序并从 jenkins 执行它。

问题:我正在尝试访问我正在处理的 silverlight 应用程序中页面底部的文件夹"SandboxRefresh"。

please find the code below:
SilverlightElement jobfolder2 = extab.GetFirstOrDefaultUIElement(criteria.ByName("SandboxRefresh").AndByClassName("TextBlock"));
Issue Observed:
Executing the above java code in Eclipse resulted in Arithmetic overflow exception as it could not find the element at the bottom of the page.
Please note:
I tried many approaches that worked for me in my machine but it did not work from Jenkins.
ex:
Button  bt= new Button();
Screen scr= new Screen();
scr.wheel(bt.WHEEL_DOWN, 2);
The above code worked well to scroll to the bottom of the page but it is not sucessful always. Sometimes the code gets executed by scroll does not happen.
Can anyone help me with an approach to scroll to the desired element in silverlight application when launched the code from jenkins ? 

两件快速的事情,您是否在等待以前的代码完成并且窗口是否仍然清晰?

最新更新