# Sendkeys is not working in a Test Case when I call it as a function in a different Test case

**URL:** <https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237>\
**Category:** Bug Report\
**Tags:** katalon-studio, bugs-report\
**Created:** [December 10, 2018, 4:43pm UTC](https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237 "2018-12-10T16:43:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![suneetha.musunuri7](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@suneetha.musunuri7](https://forum.katalon.com/u/suneetha.musunuri7)\
**Post date:** [December 10, 2018, 4:43pm UTC](https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237/1 "2018-12-10T16:43:55Z")

</div>

Hi…  
I’m seeing issue with sendkeys when I call the Test Case as a function in a different Test case. It is working fine when I execute the Test case and seeing this issue only when I call it as a function in a different Test case. Currently I’m working with Katalon 5.8.4.

---

<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:** [December 10, 2018, 4:53pm UTC](https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237/2 "2018-12-10T16:53:53Z")

</div>

I think we might need a little more information. What exactly do you mean by “call a test case as a function”? Post some of your code so we can see what you’re trying to achieve.

---

<div class="post-metadata">

**Author:** ![suneetha.musunuri7](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@suneetha.musunuri7](https://forum.katalon.com/u/suneetha.musunuri7)\
**Post date:** [December 11, 2018, 10:08pm UTC](https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237/3 "2018-12-11T22:08:05Z")

</div>

Hi..  
I have called the highlighted Test case and send keys is not working in that Test case. which is working fine when I ran the Test Case individually. Please see the attached pic for error

 ![image](https://europe1.discourse-cdn.com/katalon/original/1X/f2fe1f3c01fa0b7d7f0df47b58338f3d28bbc843.png)

---

<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:** [December 11, 2018, 10:15pm UTC](https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237/4 "2018-12-11T22:15:10Z")

</div>

Make sure you have imported the Keys class:

import org.openqa.selenium.Keys as Keys

And, more importantly, make sure you read this next post – trying to figure out what you are doing from a screenshot that is inconveniently cropped right at the point of the relevant error message is not the kind of thing I normally have any patience for:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-my-test-is-broken-nothing-works-please-help-me/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [December 11, 2019, 10:15pm UTC](https://forum.katalon.com/t/sendkeys-is-not-working-in-a-test-case-when-i-call-it-as-a-function-in-a-different-test-case/15237/5 "2019-12-11T22:15:13Z")

</div>

Closed on December 11, 2019, 10:15pm UTC

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
