# Desktop: WindowsTestObjects null in GlobalVariables

**URL:** <https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613>\
**Category:** Bug Report\
**Created:** [February 27, 2025, 11:04am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613 "2025-02-27T11:04:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![veroS](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/veros/32/20464_2.png) [@veroS](https://forum.katalon.com/u/veroS)\
**Post date:** [February 27, 2025, 11:04am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/1 "2025-02-27T11:04:53Z")

</div>

Stepps to reproduce:

- Open any Profile
- Add a GlobalVariable with ValueType “TestObject”
- Click in field “Value”: Object Reporitory Tree is displayed. Select any WINDOWSTestObject → possible
- Close selection

Expected behaviour:  
EITHER  
WINDOWS testObjects can not be selected (if it is not possible to put the in global vars, which is very poor)  
OR  
WindowsTestObject is displayed as value

Actual behaviour:  
value = findTestObject(null)

* * *

Setting Object via Script view also does not work …

---

<div class="post-metadata">

**Author:** ![gmarichal](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gmarichal/32/28810_2.png) [@gmarichal](https://forum.katalon.com/u/gmarichal)\
**Post date:** [February 27, 2025, 1:45pm UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/2 "2025-02-27T13:45:55Z")

</div>

I was able to reproduce this:

It seems an error in KS. I tried the same using a Web Test Object and it worked!

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/3/e/3e78d6889ffc11fd916ead27d63743bd0bef7428.png)

I don’t know exactly who I could mention in this reply, but @albert.vu or @viet.nguyen surely do.

---

<div class="post-metadata">

**Author:** ![vu.tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/vu.tran/32/20584_2.png) [@vu.tran](https://forum.katalon.com/u/vu.tran)\
**Post date:** [February 28, 2025, 2:29am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/3 "2025-02-28T02:29:33Z")

</div>

Thanks Gaston for sharing! We will inform our product team @Elly_Tran can help create an internal ticket.

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [February 28, 2025, 4:07am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/4 "2025-02-28T04:07:17Z")

</div>

Hi @veroS,

Welcome back after a while. Thank you for letting us know your issue.

I will create the ticket for my team to investigate and keep you updated about this. Thank you

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [March 6, 2025, 2:23am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/7 "2025-03-06T02:23:27Z")

</div>

Hi @veroS,

Sorry for my late response. I got the answer that the root cause may be when adding a variable as Global Variable/Variable, the function shows as **findTestObject** , the correct function must be **findWindowsObject**.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/e/d/edf685bf388658549b5be8626f1f21fbdc413943.jpeg)

And in script mode, we could assigned to a variable. It works as expectation.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/7/8/783fe7929cb4ef952e214c55ac9aadab4a13a0c7.png)

Also, remember to use the correct function findWindowsObject as well. Hope this can help. Thank you

---

<div class="post-metadata">

**Author:** ![veroS](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/veros/32/20464_2.png) [@veroS](https://forum.katalon.com/u/veroS)\
**Post date:** [March 6, 2025, 6:59am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/8 "2025-03-06T06:59:51Z")

</div>

Thank you for your answer, @Elly_Tran . No, this does not solve the problem because the bug is, that the GlobalVariables can not be used to store a WindowsTestObject. Please fix the bug.

---

<div class="post-metadata">

**Author:** ![veroS](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/veros/32/20464_2.png) [@veroS](https://forum.katalon.com/u/veroS)\
**Post date:** [March 12, 2025, 6:30am UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/9 "2025-03-12T06:30:04Z")

</div>

Will there be any action?

---

<div class="post-metadata">

**Author:** ![TheCodister](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thecodister/32/30227_2.png) [@TheCodister](https://forum.katalon.com/u/TheCodister)\
**Post date:** [October 9, 2026, 1:15pm UTC](https://forum.katalon.com/t/desktop-windowstestobjects-null-in-globalvariables/166613/10 "2026-10-09T13:15:40Z")

</div>

Hi @veroS

This fix is now available in version 11.6.0, could you please download the latest version here and try: [Katalon Studio Download | Katalon](https://katalon.com/download)
