# Test Object is not recognize when accessing via DDT

**URL:** <https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591>\
**Category:** Miscellaneous\
**Created:** [June 19, 2018, 2:51am UTC](https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591 "2018-06-19T02:51:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andrew](https://forum.katalon.com/u/Andrew)\
**Post date:** [June 19, 2018, 2:51am UTC](https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591/1 "2018-06-19T02:51:04Z")

</div>

Hi

I have a script that accessing several objects on the webpage and works fine.  
**Example:**

WebUI.waitForElementPresent(findTestObject(‘Page\_Inbox/span\_CPE410486’), 10)

WebUI.click(findTestObject(‘Page\_Inbox/span\_CPE410486’))

WebUI.delay(3)

Well - i have decided to access the same objects via DDT.

**Example:**

CSVData data = findTestData(“DDT1”)

for (def index : (0…data.getRowNumbers() - 1)) {

WebUI.delay(5)

emailClick = (‘Page\_Inbox/span\_’ + data.internallyGetValue(“OfferType”, index) + data.internallyGetValue(“CID”, index))

println(emailClick)

WebUI.click(emailClick)

Now it is being printed in console precisely as if it is in the 1st example:  
WebUI.click(findTestObject(‘Page\_Inbox/span\_CPE410486’))

However it errors with this error:  
_Test Cases/Inbox-Tasks FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click() is applicable for argument types: (java.lang.String) values: [Page\_Inbox/span\_CPE410486]_

Please let me know if you aware of any workaround or what is incorrect in the above case.

Thank you!!!  
Andrew

---

<div class="post-metadata">

**Author:** ![Marek\_Melocik](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marek_melocik/32/371_2.png) [@Marek\_Melocik](https://forum.katalon.com/u/Marek_Melocik)\
**Post date:** [June 19, 2018, 5:43am UTC](https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591/2 "2018-06-19T05:43:56Z")

</div>

Hi Andrew,

WebUI.click() expects TestObject as a parameter. You put String there (variable **emailClick** ), so you get error. I assume that this variable is a path to your TestObject in ObjectRepository. So you should use findTestObject(String path) method, which returns TestObject type.

WebUI.click(findTestObject(emailClick))

It is actually the same way as you used in first example 🙂

WebUI.click(findTestObject(‘Page\_Inbox/span\_CPE410486’))

---

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andrew](https://forum.katalon.com/u/Andrew)\
**Post date:** [June 20, 2018, 1:06am UTC](https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591/3 "2018-06-20T01:06:59Z")

</div>

> Marek Melocik said:
> 
> Hi Andrew,
> 
> WebUI.click() expects TestObject as a parameter. You put String there (variable **emailClick** ), so you get error. I assume that this variable is a path to your TestObject in ObjectRepository. So you should use findTestObject(String path) method, which returns TestObject type.
> 
> WebUI.click(findTestObject(emailClick))
> 
> It is actually the same way as you used in first example 🙂
> 
> WebUI.click(findTestObject(‘Page\_Inbox/span\_CPE410486’))

Hi Marek

I have tried with your suggestion, and it worked. 🙂

However only if i DO NOT use one of these:

WebUI.waitForElementPresent(findTestObject(emailClick, 10))

**OR**  
WebUI.waitForElementVisible(findTestObject(emailClick, 10))

If i use the above - i will get this error:

_Test Cases/Inbox-Tasks FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.testobject.ObjectRepository.findTestObject() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [Page\_Inbox/span\_CPE410486, 10]_

_Possible solutions: findTestObject(java.lang.String), findTestObject(java.lang.String, java.util.Map)_

Do you know what causing this?

Thank you!  
Andrew

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [June 20, 2018, 2:21am UTC](https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591/4 "2018-06-20T02:21:45Z")

</div>

Andrew

Take more care with your method calls and their arguments. Your error is telling you what is wrong – it’s saying there is no existing method called findTestObject that takes a string followed by an integer, which is exactly what you are trying to do:

```auto
// THIS IS WRONG!
findTestObject(emailClick, 10)

//findTestObject(<string>, <integer>) // WRONG!

```

The runtime is looking at this and saying, “nope, findTestObject cannot handle this, I’m going stop the program.”

However, waitForElementPresent takes a TestObject and an integer:

```auto
WebUI.waitForElementPresent(<TO>, <integer>)

```

So all you’ve done is passed your 10 _to the wrong method_ -- you passed it to findTestObject instead of waitForElementPresent. All this boils down to a misplaced closing parenthesis:

```auto
WebUI.waitForElementPresent(findTestObject(emailClick), 10)

```

---

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andrew](https://forum.katalon.com/u/Andrew)\
**Post date:** [June 20, 2018, 3:11am UTC](https://forum.katalon.com/t/test-object-is-not-recognize-when-accessing-via-ddt/11591/5 "2018-06-20T03:11:34Z")

</div>

> [Russ Thomas](https://forum.katalon.com/profile/4015/Russ%20Thomas) said:
> 
> Andrew
> 
> Take more care with your method calls and their arguments. Your error is telling you what is wrong – it’s saying there is no existing method called findTestObject that takes a string followed by an integer, which is exactly what you are trying to do:
> 
> ```auto
> // THIS IS WRONG!
> 
> ```

findTestObject(emailClick, 10)

//findTestObject(, ) // WRONG!

> ```auto
> 
>   
> The runtime is looking at this and saying, "nope, findTestObject cannot handle this, I'm going stop the program."  
>   
> However, waitForElementPresent takes a TestObject and an integer:  
>   
> 
> ```
> 
> WebUI.waitForElementPresent(, )
> 
> ```auto
> 
>   
> So all you've done is passed your 10 _to the wrong method_ \-\- you passed it to findTestObject instead of waitForElementPresent. All this boils down to a misplaced closing parenthesis:  
>   
> 
> ```
> 
> WebUI.waitForElementPresent(findTestObject(emailClick), 10)
> 
> ```auto
> 
>   
> 
>   
> 
> ```

Thank you Russ - worked as Swiss watch 🙂

You helped me a lot in several topics!!!

I did lots of progress. I will zip my project to share in a day or so - just in case that you can see - i didn’t give up and your support did not go in vain 🙂

Andrew
