# Using sendKeys with no object select

**URL:** <https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119>\
**Category:** Web Testing\
**Tags:** web-testing\
**Created:** [November 30, 2022, 6:24pm UTC](https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119 "2022-11-30T18:24:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![swinston](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/swinston/32/20464_2.png) [@swinston](https://forum.katalon.com/u/swinston)\
**Post date:** [November 30, 2022, 6:24pm UTC](https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119/1 "2022-11-30T18:24:20Z")

</div>

Hello!  
I am trying to use the sendkey feature without a selected target.  
This is what I have right now, I select something in my table in row 3, shift over one arrow key, then press tab, then press enter. When i do it manually it works just fine, but when i run my code (below) it selects the button in row 4 instead of row 3.

See code below: any idea of what is happening here?  
Thank you!

WebUI.click(findTestObject(‘Object Repository/Page\_Dashboard/div\_Dashboard’))

WebUI.click(findTestObject(‘Object Repository/Page\_Dashboard/span\_Local Hazards’))

WebUI.sendKeys(null, Keys.chord(Keys.ARROW\_LEFT, Keys.TAB, Keys.ENTER))

---

<div class="post-metadata">

**Author:** ![swinston](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/swinston/32/20464_2.png) [@swinston](https://forum.katalon.com/u/swinston)\
**Post date:** [November 30, 2022, 6:32pm UTC](https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119/2 "2022-11-30T18:32:35Z")

</div>

Ading more more info here,  
It seems as though the left arrow is is what is not taking, when i am pressing tab it it does to the next line which is why the whole selection is made. Not sure why the left arrow key function is not working.

---

<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:** [November 30, 2022, 10:52pm UTC](https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119/3 "2022-11-30T22:52:31Z")

</div>

Just a note that your code above is from Katalon Studio, not Katalon Recorder. Perhaps you are using the Web Recorder of Katalon Studio. Katalon Recorder is a separate product.

Instead of **null** , put in the element that was the last position you want to move away from. That is basically what you are doing manually, so do it with your code.

---

<div class="post-metadata">

**Author:** ![swinston](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/swinston/32/20464_2.png) [@swinston](https://forum.katalon.com/u/swinston)\
**Post date:** [December 1, 2022, 3:22pm UTC](https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119/4 "2022-12-01T15:22:16Z")

</div>

Hi @grylion54,  
Thank you!  
I have update my code to be this:

WebUI.sendKeys(findTestObject(‘Object Repository/Page\_Dashboard/span\_Local Hazards (1)’), Keys.chord(Keys.ARROW\_LEFT))

WebUI.delay(1)

WebUI.sendKeys(null, Keys.chord(Keys.TAB))

but am getting an erorr that says “com.kms.katalon.core.exception.StepFailedException: Unable to send keys ‘’ to object ‘Object Repository/Page\_Dashboard/span\_Local Hazards (1)’”

---

<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:** [December 1, 2022, 3:46pm UTC](https://forum.katalon.com/t/using-sendkeys-with-no-object-select/81119/5 "2022-12-01T15:46:15Z")

</div>

> [@swinston](#):
>
> WebUI.sendKeys(null, Keys.chord(Keys.TAB))

Okay, so it may have to be an **input** tag, or even maybe a **select** tag, that can “accept” the send keys.

Are you trying to move to a specific location, or just to enter the key combination?

Also, if you put code into this forum, put three backticks (i.e. ```) on a line by themselves above the code and three backticks on a line by themselves below the code. The backtick is found on the same key as the tilde (i.e. ~).
