Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

implicitwait and explicitwait not solving the issue in selenium webdriver

View previous topic View next topic Go down

implicitwait and explicitwait not solving the issue in selenium webdriver

Post by mandeep on Mon Nov 28, 2011 7:56 pm

Hi friends,
I've been testing an application involving multiple ajax calls ,so I required wait condition so that elements are present/visible once the ajax call is made. I used both methods implicitwait and explicitwait but none of them seem to be working for me as one or the other exceptions are generated as follows:
1.Unable to locate element
2.Element is disabled and so may not be used for actions
Implicitwait used as follows:
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
WebElement we = driver.findElement(By.name("q"));
PROBLEM:
When I test this code, after browser opens, it throws exception in 2 seconds.
Result:Exception generated
ExplicitWait
WebDriverWait wait = new WebDriverWait(driver, /*seconds=*/3);
WebElement element = wait.until(presenceOfElementLocated(By.name("q"));
PROBLEM:
When I test this code, after browser opens, it throws exception in 2 seconds, so what is really going on?
Result:Exception generated.
Also used visibilityOfElementLocated but it does not work for me.
****************

Has anybody faced this issue or anybody has a solution for this??

mandeep

Posts : 1
Join date : 2011-11-28

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum