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

时间:2018-03-07 06:08:49

标签: jenkins silverlight sikuli

我正致力于自动化silverlight应用程序并从jenkins执行它。

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

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 ? 

1 个答案:

答案 0 :(得分:0)

两个快速的事情,你在等待以前的代码完成并且窗口仍然是焦点吗?