Issue with WebDriver driver = DriverFactory.getWebDrive() command

I have used WebDriver driver = DriverFactory.getWebDrive() command for webelement and getting issue with this command. Imported class import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory also to test case.

Please see below code i have used:

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.checkpoint.CheckpointFactory as CheckpointFactory

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords

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.testcase.TestCaseFactory as TestCaseFactory

import com.kms.katalon.core.testdata.TestData as TestData

import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory

import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository

import com.kms.katalon.core.testobject.TestObject as TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

import org.openqa.selenium.Keys as Keys

import org.openqa.selenium.WebDriver as WebDriver

import org.openqa.selenium.By as By

import org.openqa.selenium.WebElement as WebElement

import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

import org.openqa.selenium.WebDriver as WebDriver

WebUI.openBrowser(‘’)

WebUI.navigateToUrl(‘http://automationpractice.com/index.php’)

WebUI.maximizeWindow()

WebUI.mouseOver(findTestObject(‘AddItems_Cart/Home_Picture’))

WebUI.waitForAngularLoad(10)

WebUI.waitForElementPresent(findTestObject(‘AddItems_Cart/Home_AddtoCart’), 10)

WebUI.click(findTestObject(‘AddItems_Cart/Home_AddtoCart’))

WebUI.waitForElementPresent(findTestObject(‘AddItems_Cart/h2Item_Confirmation_Message’), 10)

not_run: WebUI.waitForElementPresent(findTestObject(‘AddItems_Cart/Proceed_ToCheckout_Button’), 20)

WebUI.click(findTestObject(‘AddItems_Cart/Proceed_ToCheckout_Button’))

WebUI.waitForElementPresent(findTestObject(‘AddItems_Cart/CartSummary_Message’), 10)

WebDriver driver = DriverFactory.getWebDrive()

‘To locate table’

WebElement Table = driver.findElement(By.xpath(‘//table[@id=“cart_summary”]/tfoot’))

‘To locate rows of table it will Capture all the rows available in the table’

List rows_table = Table.findElements(By.tagName(‘tr’))

‘To calculate no of rows In table’

int rows_count = rows_table.size()

println('Number of Row ’ + rows_count)

not_run: WebUI.click(findTestObject(‘Login/span_Proceed to checkout (1)’))

Getting below result

Test Cases/Verify_Item_Cost FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.driver.DriverFactory.getWebDrive() is applicable for argument types: () values:

Possible solutions: getWebDriver(), openWebDriver(), openWebDriver(com.kms.katalon.core.driver.DriverType, java.lang.String, java.lang.Object)

Test Cases/Verify_Item_Cost.run:51

WebDriver driver = DriverFactory.getWebDriver()

You need a ‘r’ character. That’s all.

Take a deep breath and read the message; it is indicating the solution for you:

Possible solutions: getWebDriver(),

Thank you Resolved issue. Very silly mistake.