Wait.until not working in selenium in web project











up vote
0
down vote

favorite
1












So far I used 2.53 version of selenium and all my waits were done this way -



WebDriverWait wait = new WebDriverWait(driver, 20);
WebElement elem = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("userId"));


Now I updated the selenium version to be 3.0.1 and I am getting the error at the corresponding line.



I have seen some of the solutions in some stack overflow threads. Their answers would be like.. higher versions of selenium no longer supporting wait.until and advised to add some dependency in maven project.



But unfortunately I have not used maven project. Am using web project.
Can anyone know how to resolve this error? Or is there is any way to make browser wait other than wait.until?










share|improve this question
























  • is it a typo? I see you have not used the wait object that you initiated in first line. the second line has start with Capital Wait. Actually it should be, WebElement elem = wait.until(
    – Navarasu
    Nov 9 at 11:38










  • Yes.. sorry for that !
    – sherin shaf
    Nov 9 at 11:40















up vote
0
down vote

favorite
1












So far I used 2.53 version of selenium and all my waits were done this way -



WebDriverWait wait = new WebDriverWait(driver, 20);
WebElement elem = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("userId"));


Now I updated the selenium version to be 3.0.1 and I am getting the error at the corresponding line.



I have seen some of the solutions in some stack overflow threads. Their answers would be like.. higher versions of selenium no longer supporting wait.until and advised to add some dependency in maven project.



But unfortunately I have not used maven project. Am using web project.
Can anyone know how to resolve this error? Or is there is any way to make browser wait other than wait.until?










share|improve this question
























  • is it a typo? I see you have not used the wait object that you initiated in first line. the second line has start with Capital Wait. Actually it should be, WebElement elem = wait.until(
    – Navarasu
    Nov 9 at 11:38










  • Yes.. sorry for that !
    – sherin shaf
    Nov 9 at 11:40













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





So far I used 2.53 version of selenium and all my waits were done this way -



WebDriverWait wait = new WebDriverWait(driver, 20);
WebElement elem = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("userId"));


Now I updated the selenium version to be 3.0.1 and I am getting the error at the corresponding line.



I have seen some of the solutions in some stack overflow threads. Their answers would be like.. higher versions of selenium no longer supporting wait.until and advised to add some dependency in maven project.



But unfortunately I have not used maven project. Am using web project.
Can anyone know how to resolve this error? Or is there is any way to make browser wait other than wait.until?










share|improve this question















So far I used 2.53 version of selenium and all my waits were done this way -



WebDriverWait wait = new WebDriverWait(driver, 20);
WebElement elem = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("userId"));


Now I updated the selenium version to be 3.0.1 and I am getting the error at the corresponding line.



I have seen some of the solutions in some stack overflow threads. Their answers would be like.. higher versions of selenium no longer supporting wait.until and advised to add some dependency in maven project.



But unfortunately I have not used maven project. Am using web project.
Can anyone know how to resolve this error? Or is there is any way to make browser wait other than wait.until?







selenium wait






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 20:11









Ballal Joshi

203




203










asked Nov 9 at 11:05









sherin shaf

34




34












  • is it a typo? I see you have not used the wait object that you initiated in first line. the second line has start with Capital Wait. Actually it should be, WebElement elem = wait.until(
    – Navarasu
    Nov 9 at 11:38










  • Yes.. sorry for that !
    – sherin shaf
    Nov 9 at 11:40


















  • is it a typo? I see you have not used the wait object that you initiated in first line. the second line has start with Capital Wait. Actually it should be, WebElement elem = wait.until(
    – Navarasu
    Nov 9 at 11:38










  • Yes.. sorry for that !
    – sherin shaf
    Nov 9 at 11:40
















is it a typo? I see you have not used the wait object that you initiated in first line. the second line has start with Capital Wait. Actually it should be, WebElement elem = wait.until(
– Navarasu
Nov 9 at 11:38




is it a typo? I see you have not used the wait object that you initiated in first line. the second line has start with Capital Wait. Actually it should be, WebElement elem = wait.until(
– Navarasu
Nov 9 at 11:38












Yes.. sorry for that !
– sherin shaf
Nov 9 at 11:40




Yes.. sorry for that !
– sherin shaf
Nov 9 at 11:40












1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










1) Go to https://mvnrepository.com/



2) Search for the artifact you want to add (e.g. selenium-support)



3) Click on the appropriate artifact link and then select required version



4) Search for 'Files' section on the page and click on 'jar' to download the jar file.



5) Add the downloaded jar to the 'Build Path' of your project.



NOTE: Also check for the compile dependencies mentioned on the page.






share|improve this answer





















  • Thanks for ur answer! I ll try this solutions
    – sherin shaf
    Nov 9 at 11:40











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224528%2fwait-until-not-working-in-selenium-in-web-project%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










1) Go to https://mvnrepository.com/



2) Search for the artifact you want to add (e.g. selenium-support)



3) Click on the appropriate artifact link and then select required version



4) Search for 'Files' section on the page and click on 'jar' to download the jar file.



5) Add the downloaded jar to the 'Build Path' of your project.



NOTE: Also check for the compile dependencies mentioned on the page.






share|improve this answer





















  • Thanks for ur answer! I ll try this solutions
    – sherin shaf
    Nov 9 at 11:40















up vote
0
down vote



accepted










1) Go to https://mvnrepository.com/



2) Search for the artifact you want to add (e.g. selenium-support)



3) Click on the appropriate artifact link and then select required version



4) Search for 'Files' section on the page and click on 'jar' to download the jar file.



5) Add the downloaded jar to the 'Build Path' of your project.



NOTE: Also check for the compile dependencies mentioned on the page.






share|improve this answer





















  • Thanks for ur answer! I ll try this solutions
    – sherin shaf
    Nov 9 at 11:40













up vote
0
down vote



accepted







up vote
0
down vote



accepted






1) Go to https://mvnrepository.com/



2) Search for the artifact you want to add (e.g. selenium-support)



3) Click on the appropriate artifact link and then select required version



4) Search for 'Files' section on the page and click on 'jar' to download the jar file.



5) Add the downloaded jar to the 'Build Path' of your project.



NOTE: Also check for the compile dependencies mentioned on the page.






share|improve this answer












1) Go to https://mvnrepository.com/



2) Search for the artifact you want to add (e.g. selenium-support)



3) Click on the appropriate artifact link and then select required version



4) Search for 'Files' section on the page and click on 'jar' to download the jar file.



5) Add the downloaded jar to the 'Build Path' of your project.



NOTE: Also check for the compile dependencies mentioned on the page.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 11:32









Ballal Joshi

203




203












  • Thanks for ur answer! I ll try this solutions
    – sherin shaf
    Nov 9 at 11:40


















  • Thanks for ur answer! I ll try this solutions
    – sherin shaf
    Nov 9 at 11:40
















Thanks for ur answer! I ll try this solutions
– sherin shaf
Nov 9 at 11:40




Thanks for ur answer! I ll try this solutions
– sherin shaf
Nov 9 at 11:40


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224528%2fwait-until-not-working-in-selenium-in-web-project%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff