{"action":"opened","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/5720","repository_url":"https://api.github.com/repos/SeleniumHQ/selenium","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/5720/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/5720/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/5720/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/5720","id":310473885,"number":5720,"title":"[Query] Unable to pass a variable string to the ExpectedConditions method presenceOfElementLocated()","user":{"login":"Debanjan-B","id":26503213,"avatar_url":"https://avatars3.githubusercontent.com/u/26503213?v=4","gravatar_id":"","url":"https://api.github.com/users/Debanjan-B","html_url":"https://github.com/Debanjan-B","followers_url":"https://api.github.com/users/Debanjan-B/followers","following_url":"https://api.github.com/users/Debanjan-B/following{/other_user}","gists_url":"https://api.github.com/users/Debanjan-B/gists{/gist_id}","starred_url":"https://api.github.com/users/Debanjan-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Debanjan-B/subscriptions","organizations_url":"https://api.github.com/users/Debanjan-B/orgs","repos_url":"https://api.github.com/users/Debanjan-B/repos","events_url":"https://api.github.com/users/Debanjan-B/events{/privacy}","received_events_url":"https://api.github.com/users/Debanjan-B/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-02T12:35:01Z","updated_at":"2018-04-02T12:35:01Z","closed_at":null,"author_association":"NONE","body":"## Meta - Need help to understand the implementation of the _ExpectedConditions_ method `presenceOfElementLocated()` which is defined as :\r\n\r\n```\r\n  public static ExpectedCondition<WebElement> presenceOfElementLocated(final By locator) {\r\n    return new ExpectedCondition<WebElement>() {\r\n      @Override\r\n      public WebElement apply(WebDriver driver) {\r\n\treturn findElement(locator, driver);\r\n      }\r\n```\r\n\r\nIn one of my Tests I have implemented _WebDriverWait_ as follows :\r\n\r\n```\r\npublic static WebDriverWait wait = null; \r\nwait = new WebDriverWait(driver, 120);\r\nwait.until(ExpectedConditions.presenceOfElementLocated(By.id(HomeScreen.tabHome_ID)));\r\n```\r\nThis gives me an error as follows : \r\n\r\n```\r\nError:(51, 19) java: method until in class org.openqa.selenium.support.ui.FluentWait cannot be applied to given types;\r\nrequired: java.util.function.Function<? super org.openqa.selenium.WebDriver,V>\r\nfound: org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement>\r\nreason: cannot infer type-variable(s) V\r\n(argument mismatch; org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement> cannot be converted to java.util.function.Function<? super org.openqa.selenium.WebDriver,V>)\r\n```\r\n\r\nCan someone help me to understand where am I wrong?\r\n\r\nOS:  Windows8 Pro\r\nSelenium Version:  3.x\r\nBrowser:  Firefox\r\n\r\nBrowser Version:  59.0.2 (64-bit)\r\n\r\n## Expected Behavior - NA\r\n\r\n## Actual Behavior - NA\r\n\r\n## Steps to reproduce - NA\r\n"}}
{"actor":{"display_login":"Debanjan-B"}}