title: Using selenium wait until in katalon studio, Groovy
body: <p>So I have been trying to implement wait function from selenium to a katalon groovy script, and I keep getting an error for line the following line</p>
  
  <pre><code>   WebUI.wait.Until(FindElement(By.XPath("//*[contains(text(), 'Fund Metrics Trend']")), 10)
  </code></pre>
  
  <p>here is my code if anyone could tell me why I am getting the following error:</p>
  
  <p>Reason:[0;39m
  [31mgroovy.lang.MissingPropertyException: No such property: wait for class: com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords[0;39m
  [31m    at Tabs Permissions.run(Tabs Permissions:54)[0;39m
  [31m    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)[0;39m
  [31m    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:321)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:312)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:291)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:283)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:222)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)[0;39m
  [31m    at TempTestCase1545063637352.run(TempTestCase1545063637352.groovy:22)[0;39m
  2018-12-17 11:21:19.430 [1;31mERROR[0;39m [36mc.k.katalon.core.main.TestCaseExecutor   -[0;39m [31m❌ Test Cases/Tabs Permissions FAILED.[0;39m
  [31mReason:[0;39m
  [31mgroovy.lang.MissingPropertyException: No such property: wait for class: com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords[0;39m
  [31m    at Tabs Permissions.run(Tabs Permissions:54)[0;39m
  [31m    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)[0;39m
  [31m    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:321)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:312)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:291)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:283)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:222)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)[0;39m
  [31m    at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)[0;39m
  [31m    at TempTestCase1545063637352.run(TempTestCase1545063637352.groovy:22)[0;39m
  2018-12-17 11:21:19.430 [34mINFO [0;39m [36mc.k.katalon.core.main.TestCaseExecutor   -[0;39m [39mEND Test Cases/Tabs Permissions</p>
  
  <pre><code>   import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
     import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
     import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
     import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
     import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
     import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
     import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
     import com.kms.katalon.core.model.FailureHandling as FailureHandling
     import com.kms.katalon.core.testcase.TestCase as TestCase
     import com.kms.katalon.core.testdata.TestData as TestData
     import com.kms.katalon.core.testobject.TestObject as TestObject
     import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
     import internal.GlobalVariable as GlobalVariable
  
     import org.openqa.selenium.WebDriver
     import org.openqa.selenium.chrome.ChromeDriver
     import org.openqa.selenium.support.ui.WebDriverWait
     import com.kms.katalon.core.webui.driver.DriverFactory
     import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
  
     //set Web UI delay between actions to 2 seconds Project, Settings, Execution, Default, Web UI
  
     TestData data = findTestData('Investor/Notes')
     //TestData data = findTestData('temp')
  
     WebUI.openBrowser('')
     WebDriver driver = DriverFactory.getWebDriver()
  
  
  
     WebUI.navigateToUrl(GlobalVariable.url)
     WebUI.maximizeWindow()
  
  
     WebDriverWait wait = new WebDriverWait(driver, long time=10)
  
     for (def index : (0..data.getRowNumbers() - 1)) {
  
      WebUI.setText(findTestObject('Login/Screen Elements/input_username'),               data.internallyGetValue('username', index))
         WebUI.setText(findTestObject('Login/Screen Elements/input_password'), data.internallyGetValue('password', index))
  WebUI.click(findTestObject('Login/Screen Elements/button_Login'))
  if ((data.internallyGetValue('username', index) == 'jasmine') || (data.internallyGetValue('username', index) == 'pefadmin4') || (data.internallyGetValue('username', index) == 'pefreviewer4') || (data.internallyGetValue('username', index) == 'pefreadonly4') || (data.internallyGetValue('username', index) == 'fundaccounting4'))  {
      WebUI.click(findTestObject('Client/a_DFW Capital Partners'))
      WebUI.click(findTestObject('Object Repository/Fund/a_DFW Capital Partners V L.P.'))
      WebUI.verifyElementPresent(findTestObject('Object Repository/Tabs Permissions/a_Dashboard'), 10)
      WebUI.delay(3)
      WebUI.wait.Until(FindElement(By.XPath("//*[contains(text(), 'Fund Metrics Trend']")), 10)
      WebUI.delay(3)
      WebUI.verifyTextPresent("Fund Metrics Trend", false)
  </code></pre>
  
  <p>P.S. this is only the upper part of my code, everything else works fine.</p>