# IE - test says it's clicking the button, but it's not really

**URL:** <https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [August 31, 2018, 12:45pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977 "2018-08-31T12:45:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [August 31, 2018, 12:45pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/1 "2018-08-31T12:45:09Z")

</div>

I’m running a test that is successful both in Chrome and Firefox (browser and headless) but when I get to IE, the test will find the button and pass the step that says click, but it doesn’t actually click and advance the screen.

```auto
WebUI.openBrowser(GlobalVariable.url)
WebUI.delay(5)
WebUI.click(findTestObject('Basic signon/ExistingSign In')) --this is the spot that doesn't click in IE

```

How do I make it click in IE without drastically changing my tests for other browsers?

(I have to use IE bc we have clients that use IE)

Any help is appreciated!!

---

<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:** [August 31, 2018, 1:02pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/2 "2018-08-31T13:02:16Z")

</div>

Hi Amanda

While I may not have seen this exact same problem myself, I have witnessed very similar oddities between browsers, not least with IE.

The solution (which you may hate) is to use JavaScript to generate the click. I can guarantee [1] that JavaScript hosted on that page would be able to click that element without issue. When you inject JavaScript from your test case into a page, that is exactly what you get – _JavaScript now hosted on the page_.

If you need help writing a JavaScript Click API in Katalon, read the last message here: [http://forum.katalon.com/discussion/2008/execute-javascript#latest](http://forum.katalon.com/discussion/2008/execute-javascript#latest)

Hope this helps.

[1] As long as there is no underlying browser quirk (i.e. bug) why IE is behaving badly.

---

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [August 31, 2018, 4:16pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/3 "2018-08-31T16:16:20Z")

</div>

well, thank you. I tried this:

```auto
WebElement element = WebUiCommonHelper.findWebElement(findTestObject('Basic signon/ExistingSign In'),30)WebUI.executeJavaScript("arguments[0].click", Arrays.asList(element))

```

still didn’t click on the element. I’m am 100% okay with “You did it wrong”

NOTE: I have added the desired capabilities to ignore the Protected mode and ensure clean session and introduce flakiness by ignoring security domains

---

<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:** [August 31, 2018, 5:18pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/4 "2018-08-31T17:18:03Z")

</div>

Once again that thread bites me (us). If you read my posts there (apart form my last) you’ll note how I’ve begged that Katalon Team close it or at least thin it out.

You’ve fallen foul of the one typo I tried to get someone to fix:

> [Russ Thomas](http://forum.katalon.com/profile/4015/Russ%20Thomas) said:
> 
> ```auto
> arguments[0].click()
> 
> ```
> 
> Edit: Which is a misleading error message because the reference to the click method is typeof === “function”.
> 
> Regardless, you still need to add open and close parentheses to effect the call.

So in your case, Amanda:

```auto
WebElement element = WebUiCommonHelper.findWebElement(findTestObject('Basic signon/ExistingSign In'),30)WebUI.executeJavaScript("arguments[0].click()", Arrays.asList(element))

```

---

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [August 31, 2018, 5:27pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/5 "2018-08-31T17:27:09Z")

</div>

You know what? I even know better! I took note of what you said and meant to fix it.

And it works.

Thank you

and btw Katalon Moderators, fix the arguments WebUI.executeJavaScript(“arguments[0].click”, Arrays.asList(element))  
on this page: [https://docs.katalon.com/display/KD/[WebUI]+Execute+JavaScript](https://docs.katalon.com/display/KD/%5BWebUI%5D+Execute+JavaScript)

---

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [August 31, 2018, 5:39pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/6 "2018-08-31T17:39:09Z")

</div>

follow up question: is there a way to make a keyword so that the click is reusable and not just tied to that one specific element?

---

<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:** [August 31, 2018, 6:20pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/7 "2018-08-31T18:20:08Z")

</div>

> [Amanda Perkins](https://forum.katalon.com/profile/6175/Amanda%20Perkins) said:
> 
> follow up question: is there a way to make a keyword so that the click is reusable and not just tied to that one specific element?

Isn’t that the answer at the end of that thread? If not, I’m not sure what you’re asking…

---

<div class="post-metadata">

**Author:** ![Amanda\_Perkins1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/amanda_perkins1/32/3843_2.png) [@Amanda\_Perkins1](https://forum.katalon.com/u/Amanda_Perkins1)\
**Post date:** [August 31, 2018, 6:44pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/8 "2018-08-31T18:44:26Z")

</div>

I got it now. It’s been a long day. So if I take the .click() and make that the keyword, I can reuse that in place of the webUI.click()

---

<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:** [August 31, 2018, 7:01pm UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/9 "2018-08-31T19:01:22Z")

</div>

Just FYI…

99.99% of my element interactions (clicks, set text, get text, blah blah blah) are JavaScript.

So yes. Wrap it up as a Keyword and never look back B)

---

<div class="post-metadata">

**Author:** ![AndyG72](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/andyg72/32/16103_2.png) [@AndyG72](https://forum.katalon.com/u/AndyG72)\
**Post date:** [May 6, 2021, 10:19am UTC](https://forum.katalon.com/t/ie-test-says-its-clicking-the-button-but-its-not-really/12977/10 "2021-05-06T10:19:12Z")

</div>

> [@Russ\_Thomas](#):
>
> 99.99% of my element interactions (clicks, set text, get text, blah blah blah) are JavaScript.
> 
> So yes. Wrap it up as a Keyword and never look back B)

I am starting to come to the same conclusion that this is the way forward. I’ve had to use this solution a lot recently…
