在IE11中使用Selenium Webdriver单击按钮后无法移至下一页

时间:2016-06-16 18:51:42

标签: java selenium

这是我的第一篇文章,因为我多年来一直坚持这个问题。单击按钮后,我的脚本无法移动到下一页。我检查了该元素是否存在,然后点击它。它显示下一页但脚本继续运行并且永远不会返回。它永远不会执行下面给出的信息。

System.out.println("continue button clicked");

复制我的Selenium和Java代码。请帮忙......

HTML:

<a tabindex="76" href="javascript:formSubmit()" oncontextmenu="return false">
<img src="/RetailCustomerManagement/resources/graphics/continue_orange_en.gif" style="border:none;"/>
</a>

Java代码:(使用框架工作)

        boolean isElementpresent       = PerformAction.isElementsPresentNameCheck(continuebutton).size()!=0;
        System.out.println("Is Element present? " + isElementpresent);


        PerformAction.waitForElementToBeClickable(continuebutton);
        PerformAction.FuncSubmit(continuebutton);
        //PerformAction.FuncClick(continuebutton);
        System.out.println("continue button clicked");

         }

             catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

0 个答案:

没有答案