请提供硒rc代码[重复]

问题描述

||                                                                                                                   这个问题已经在这里有了答案:                                                      

解决方法

        试试下面的代码: 公共类SampleTest扩展了SeleneseTestCase {   @测试   公共无效sampleTest()引发异常   {    setUp(\“ http://www.google.com \”,\“ * iexplore \”);    selenium.windowMaximize();    selenium.windowFocus();    selenium.open(\“ / \”);    selenium.type(\“ q \”,\“软件\”);    selenium.click(\“ btnG \”);    selenium.waitForPageToLoad(\“ \”);   for(int second = 0 ;; second ++){             如果(秒> = 60)失败(\“超时\”);             尝试             {               如果(selenium.isElementPresent(\“ link =计算机软件-维基百科,免费的百科全书\”))                   打破;               }             catch(异常e){}               Thread.sleep(1000);             }
    selenium.click(\"link=Computer software - Wikipedia,the free encyclopedia\");
} }