How do you select a link from a drop down window with PHPUnit & Selenium -


Hi I am starting to start some tests automatic. This is to confirm that some submenu options are present when you are trying to hover over the drop-down menu. But I get an exception from PHPUnit:

PHPUnit_Extensions_Selenium2TestCase_WebDriverException: Element is currently not visible and so command term or can not communicate with expiration: 16 milliseconds information Build Version ' 2.39.0 'amendment' Ff23eac 'time:' 2013-12-16 16:11:15 'system information: host: "Win -5 FCJ9IIGCSP' IP 'L92kl68k3lkl28, Oskname' Windows Server 2008 R2 ', OS Arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51' session ID: 9fad5b24-2a1e-472d-bb36-b8914b3a92c2 driver information: org.openqa.selenium.firefox.FirefoxDriver capabilities [{ Forums = XP, acceptSslCerts = true, javascriptEnabled = true, cssSelectorsEnabled = true, databaseEnabled = true, browserName = Firefox, handlesAlerts = true, browserConnectionEnabled = true, webStorageEnabled = true, nativeEvents = qualified false, rotation = false, locationContextEnabled = true, applicationCacheEnabled = true, takesScreenshot = true; version = 27.0.1}]

thanks to the went to search the web and appreciate any help Conor < / P> < / Dev>

Before you try to put element (dropdown) one, search for:

  sleep (3); // This will sleep for 3seconds  

or waitForElementPresent could work as well. And see what you get. Selenium might think that the page is already full and tries to find the element that is not loaded yet: the element is not currently visible


Comments