# Button is not clicked

**URL:** <https://forum.katalon.com/t/button-is-not-clicked/11916>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [July 6, 2018, 2:53pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916 "2018-07-06T14:53:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 6, 2018, 2:53pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/1 "2018-07-06T14:53:01Z")

</div>

Found this error during clicking on the button. Please find the detail

Test Cases/Booking Services for Customer FAILED because (of) Unable to click on object ‘Object Repository/Booking Services/a\_next step’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not visible

(Session info: chrome=67.0.3396.99)

(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.3.9600 x86\_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 0 milliseconds

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’

System info: host: ‘WINCTRL-I1MBNJ3’, ip: ‘192.168.0.56’, os.name: ‘Windows 8.1’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.8.0\_102’

Driver info: com.kms.katalon.selenium.driver.CChromeDriver

Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\ASSET-~1\AppData\L…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 67.0.3396.99, webStorageEnabled: true}

Session ID: 5b50e7c5c8174e13bcfdd66ef4d9eabc)

---

<div class="post-metadata">

**Author:** ![Susan\_Dollar](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Susan\_Dollar](https://forum.katalon.com/u/Susan_Dollar)\
**Post date:** [July 6, 2018, 3:37pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/2 "2018-07-06T15:37:14Z")

</div>

The error indicates the element not visible. I would check the object’s detection properties.

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 7, 2018, 3:42pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/3 "2018-07-07T15:42:14Z")

</div>

Hi Susan Thanks for your reply. I agree but when I add waitforelementvisible then this is also not working ☹

---

<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:** [July 7, 2018, 10:41pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/4 "2018-07-07T22:41:00Z")

</div>

> [nazneen](https://forum.katalon.com/profile/8578/nazneen) said:
> 
> Hi Susan Thanks for your reply. I agree but when I add waitforelementvisible then this is also not working ☹

But what is the error in that case?

---

<div class="post-metadata">

**Author:** ![Andrej\_Podhajsky](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/andrej_podhajsky/32/1055_2.png) [@Andrej\_Podhajsky](https://forum.katalon.com/u/Andrej_Podhajsky)\
**Post date:** [July 8, 2018, 3:14am UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/5 "2018-07-08T03:14:44Z")

</div>

hello,  
my guess: since it’s Next button probably somewhere on bottom of screen i would check if you don’t need scroll to it WebUI.scrollToElement(element, timeout)

---

<div class="post-metadata">

**Author:** ![ratri](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@ratri](https://forum.katalon.com/u/ratri)\
**Post date:** [July 9, 2018, 6:31am UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/6 "2018-07-09T06:31:44Z")

</div>

You can change the object repository and only checklist the possibility for the script. example only check the tag and text name. Probably the xpath is too complicated, so skipped other lists. ![](https://s3.amazonaws.com/katalon-forum/editor/8q/vdkxhsbpbihz.png "Image: https://s3.amazonaws.com/katalon-forum/editor/8q/vdkxhsbpbihz.png")

[Image 85.png](https://s3.amazonaws.com/katalon-forum/editor/8q/vdkxhsbpbihz.png)

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 11:46am UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/7 "2018-07-09T11:46:54Z")

</div>

Yes. But when I add wait for visible elements its still showing error. kindly guide me with some code.

---

<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:** [July 9, 2018, 11:58am UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/8 "2018-07-09T11:58:59Z")

</div>

> [nazneen](https://forum.katalon.com/profile/8578/nazneen) said:
> 
> Yes. But when I add wait for visible elements its still showing error. kindly guide me with some code.

I’ll repeat my previous question: WHAT IS THE ERROR when you wait for the element to be visible?

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 12:22pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/9 "2018-07-09T12:22:05Z")

</div>

Unable to click on object ‘Object Repository/Booking Services/a\_next step’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not visible

(Session info: chrome=67.0.3396.99)

(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.3.9600 x86\_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 0 milliseconds

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’

System info: host: ‘WINCTRL-I1MBNJ3’, ip: ‘192.168.0.56’, os.name: ‘Windows 8.1’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.8.0\_102’

Driver info: com.kms.katalon.selenium.driver.CChromeDriver

Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\ASSET-~1\AppData\L…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 67.0.3396.99, webStorageEnabled: true}

and my clode is:

WebUI.scrollToElement(findTestObject(‘Object Repository/Booking Services/input\_billing\_zip’), 15)

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Booking Services/a\_next step’), 5)

WebUI.click(findTestObject(‘Object Repository/Booking Services/a\_next step’))

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 12:27pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/10 "2018-07-09T12:27:18Z")

</div>

I have also used custom keywords coding but still tc failed

---

<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:** [July 9, 2018, 12:35pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/11 "2018-07-09T12:35:52Z")

</div>

Nazneen, I am at the point of giving up on you, which is sad.

You have twice complained of not being able to click on the element and twice posted the error when you try the click.

You have twice stated you get an error when waiting for it to be visible and twice I have asked you for THAT error.

Now you post the error for the click. AGAIN.

Now, pay attention: WHAT IS THE ERROR WHEN YOU WAIT FOR THE ELEMENT TO BE VISIBLE?

Sorry for shouting but after three times asking, I think it’s justified.

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 12:48pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/12 "2018-07-09T12:48:31Z")

</div>

Okay ! sorry I was focused on the error only. By the way for wait for visible element test cases passes.its only appear when I write click statement ☹

---

<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:** [July 9, 2018, 12:54pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/13 "2018-07-09T12:54:25Z")

</div>

I apologize. You didn’t say the wait caused an error, you said it was “not working”.

Okay, let’s start over.

Post a screenshot of the page at the point where the click has happened and failed to work.

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 1:13pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/14 "2018-07-09T13:13:53Z")

</div>

Oh sorry to make you confuse but I meant that wait for visible is working but click event is not working and here is the error :

Unable to click on object ‘Object Repository/Booking Services/a\_next step’ (Root cause: org.openqa.selenium.ElementNotVisibleException: element not visible

(Session info: chrome=67.0.3396.99)

(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.3.9600 x86\_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 0 milliseconds

Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’

System info: host: ‘WINCTRL-I1MBNJ3’, ip: ‘192.168.0.56’, os.name: ‘Windows 8.1’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.8.0\_102’

Driver info: com.kms.katalon.selenium.driver.CChromeDriver

Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\ASSET-~1\AppData\L…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 67.0.3396.99, webStorageEnabled: true}

and my clode is:

WebUI.scrollToElement(findTestObject(‘Object Repository/Booking Services/input\_billing\_zip’), 15)

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Booking Services/a\_next step’), 5)

WebUI.click(findTestObject(‘Object Repository/Booking Services/a\_next step’))

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 1:16pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/15 "2018-07-09T13:16:01Z")

</div>

May be I am repenting the thing again and again but my main concern is the next button is not working. earlier the wait for visible was not working then I add scrolltoelement then its working but still the click event is not working

---

<div class="post-metadata">

**Author:** ![andrew1](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@andrew1](https://forum.katalon.com/u/andrew1)\
**Post date:** [July 9, 2018, 1:30pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/16 "2018-07-09T13:30:02Z")

</div>

Hi, something that you can try is “verify object visible.” it will return either true or false.

If it returns true, Before you press the button click, Add in “focus” and choose the button.

Sometimes a 1 second delay before pressing the button can work as well.

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 1:58pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/17 "2018-07-09T13:58:35Z")

</div>

Hi Andrew can you write in a script.

---

<div class="post-metadata">

**Author:** ![andrew1](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@andrew1](https://forum.katalon.com/u/andrew1)\
**Post date:** [July 9, 2018, 2:13pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/18 "2018-07-09T14:13:23Z")

</div>

> [nazneen](https://forum.katalon.com/profile/8578/nazneen) said:
> 
> Hi Andrew can you write in a script.

I am not a programmer, I have 0 scripting knowledge.

Just use the add buttons that Katalon has, and change the settings on the input tab.

---

<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:** [July 9, 2018, 2:37pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/19 "2018-07-09T14:37:01Z")

</div>

Andrew, just some advice:

Open one of your test cases. Make sure you are fully familiar with the test case. Open the Script view tab. Study it. Try to understand how the real script is turned into what you see in Manual View.

Repeat. Every day.

Now, like me, you’re a novice programmer. Welcome.

I have been programming for 35+ years. Still learning! 😃

_Nobody is born a programmer_ B)

---

<div class="post-metadata">

**Author:** ![nazneen](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nazneen](https://forum.katalon.com/u/nazneen)\
**Post date:** [July 9, 2018, 2:42pm UTC](https://forum.katalon.com/t/button-is-not-clicked/11916/20 "2018-07-09T14:42:30Z")

</div>

> > [Andrej Podhajský](https://forum.katalon.com/profile/2584/Andrej%20Podhajsk%C3%BD "Link: /profile/2584/Andrej%20Podhajsk%C3%BD") said:
> > 
> > hello,  
> > my guess: since it’s Next button probably somewhere on bottom of screen i would check if you don’t need scroll to it WebUI.scrollToElement(element, timeout)
> 
> If I ignore to scroll to element then button not appears to visible.

[Next page](https://forum.katalon.com/t/button-is-not-clicked/11916.md?page=2)
