# Click on a button using custom keyword

**URL:** <https://forum.katalon.com/t/click-on-a-button-using-custom-keyword/47642>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [September 23, 2020, 7:30am UTC](https://forum.katalon.com/t/click-on-a-button-using-custom-keyword/47642 "2020-09-23T07:30:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziyaad.ellahee](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ziyaad.ellahee/32/16103_2.png) [@ziyaad.ellahee](https://forum.katalon.com/u/ziyaad.ellahee)\
**Post date:** [September 23, 2020, 7:30am UTC](https://forum.katalon.com/t/click-on-a-button-using-custom-keyword/47642/1 "2020-09-23T07:30:14Z")

</div>

Hello, i have checked about custom keyword on the community and however i am not able to proceed with the technical implementation. Please find below my code to click on the button:

```
try {
WebUI.click(findTestObject('scr_MemorityPassword/button_log In'))
if (WebUI.waitForElementVisible(GlobalVariable.var_authenticationFailed, 2, FailureHandling.OPTIONAL)) {
    throw new StepErrorException(GlobalVariable.var_verifyUsernamePassword) }}catch(StepErrorException e) {
WebUI.closeBrowser()
KeywordUtil.markFailedAndStop(GlobalVariable.var_loginIssue)}

```

I want to have same logic in a custom keyword. Could you please help?

---

<div class="post-metadata">

**Author:** ![ziyaad.ellahee](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ziyaad.ellahee/32/16103_2.png) [@ziyaad.ellahee](https://forum.katalon.com/u/ziyaad.ellahee)\
**Post date:** [September 23, 2020, 10:51am UTC](https://forum.katalon.com/t/click-on-a-button-using-custom-keyword/47642/2 "2020-09-23T10:51:44Z")

</div>

@ThanhTo grateful if you could help?

---

<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:** [September 23, 2020, 1:46pm UTC](https://forum.katalon.com/t/click-on-a-button-using-custom-keyword/47642/3 "2020-09-23T13:46:18Z")

</div>

> **[Introduction to Custom Keywords](https://docs.katalon.com/katalon-studio/docs/introduction-to-custom-keywords.html)**
>
> In addition to built-in keywords, you can define custom keywords to extend the capabilities of Katalon Studio. Once created, custom keywords can be used when implementing test cases, just like...

---

<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:** [September 23, 2020, 2:48pm UTC](https://forum.katalon.com/t/click-on-a-button-using-custom-keyword/47642/5 "2020-09-23T14:48:44Z")

</div>

You may need training if you can’t write computer code. Sorry, we cannot provide that here on the forum.
