# Hello , I am getting this exception groovy.lang.MissingPropertyException No such property: driver for class ,any suggestions?

**URL:** <https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [May 26, 2023, 4:19am UTC](https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560 "2023-05-26T04:19:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [May 26, 2023, 4:19am UTC](https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560/1 "2023-05-26T04:19:39Z")

</div>

here is my code for custom keyword

@Keyword  
def getHtmlTableRows(String ClientName,int a) {

```
	WebElement Table = driver.findElement(By.xpath("//table/tbody"))
	List<WebElement> rows_table = Table.findElements(By.tagName('tr'))
	int rows_count = rows_table.size()
	WebUI.comment("No of table rows:"+rows_count)

	for (int i = 0; i < rows_count; i++) {

```

String currentStep = WebUI.getText(WebUI.findTestObject(‘//table/tbody/tr/td/div/p/a’), true)) WebUI.click(WebUI.findTestObject(‘(//a[text()="’+currentStep+‘]//parent::p//parent::div//parent::td//parent::tr//td[10]/div/p/a)[’+a+‘]’, true))  
WebUI.delay(5)

How to proceed?

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [May 26, 2023, 4:25am UTC](https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560/2 "2023-05-26T04:25:15Z")

</div>

Hi,

Can you please give us full error log?

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [May 26, 2023, 4:35am UTC](https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560/3 "2023-05-26T04:35:12Z")

</div>

Do you have the below statement that instantiates/defines **driver** and the accompanying **imports** anywhere within **scope** of this custom Keyword?

```auto
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

WebDriver driver = DriverFactory.getWebDriver();

```

If not, put this at the top of your Keyword class.

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [May 26, 2023, 4:40am UTC](https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560/4 "2023-05-26T04:40:25Z")

</div>

sure.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/2/7/27cf1ee26bcae22387472326580a6dc5916ab07c.png)

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [May 26, 2023, 8:17am UTC](https://forum.katalon.com/t/hello-i-am-getting-this-exception-groovy-lang-missingpropertyexception-no-such-property-driver-for-class-any-suggestions/88560/5 "2023-05-26T08:17:19Z")

</div>

It seems to be an import error.
