Interacting with elements not visible using selenium

When implementing EndUser Login tests for my application, when logging in through LinkedIn, I get this error: "Element is not currently visible and so may not be interacted with."

This error comes while executing the test suite via maven in cmd prompt. Although the test runs perfectly through Firefox selenium plugin.

I tried maximizing my window, that also is not working.Please help.

Answers


Just give a try with below command instead of WebElement click.

WebElement element=driver.findElement(By.cssSelector("span[name='test']"));
new Actions(driver).click(element).perform();

I just put an assertElementPresent command for the Authorize button and it started detecting the button and I was able to submit.


Need Your Help

Problem with floating divs in IE8

html css internet-explorer-8 css-float

I want to make two block stand side by side. In Opera, Chrome and Firefox I get the expected result with the code I use. But IE8 refuses to display it correctly.

How to retain the untokenizable character in MaxEntTagger?

stanford-nlp

I'm using MaxEntTagger for pos-tagging and sentence splitting by using the follwing codes: