Selenium 2.0b3 IE WebDriver, Click not firing

后端 未结 18 1892
我寻月下人不归
我寻月下人不归 2020-11-29 02:33

When using the IE driver with IE9, occasionally the Click method will only select a button, it wont do the action of the Click(). Note this only happens occasionally, so i d

18条回答
  •  自闭症患者
    2020-11-29 02:51

    PHPUnit + facebook / php-webdriver sometimes the function click() doesn't check checkbox element.

    my solution is:

    $Element = $WebDriver->findElement(
        WebDriverBy::id('checkbox_id')
    );
    
    if(false === $Element->isSelected())
    {
        $Element->sendKeys(WebDriverKeys::SPACE);
    }
    

提交回复
热议问题