"Code for Checkbox Status" - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: "Code for Checkbox Status" (/Thread-Code-for-Checkbox-Status) |
"Code for Checkbox Status" - suresz449 - 12-19-2011 Hi Folks, I am using VBScript in open source tool for window based application and it is developed by dotnet technology. In my application I need to test checkbox status but the checkbox value changes build to build so I need rectify this problem I'm trying to use Screen co-ordinates and convert into window co-ordinates then get the pixel colour from that check box and veryfy the status of checkbox so, please can any one help me to get the status of checkbox. RE: "Code for Checkbox Status" - Munna.Sarfraz - 12-19-2011 Hi, As you mentioned that you are using some open source tool which is build in Dot net technology, So prior to identify the check box, we need to understand the Object identification mechanism of the tool, Might be they used MSHTL library for identification, If you have the source code or tool provide the coding window (Dot Net IDE) then you need to put below mentioned code. Single line code: Code: document.getElementById("myCheckbox").checked = true; This code will search the object into whole document. IHTMLElementClass which will return all input type control. Code: IHTMLElementCollection inputElements = (IHTMLElementCollection)doc.all.tags("input"); RE: "Code for Checkbox Status" - suresz449 - 12-19-2011 Hi Munna, Thanks for your replying but I'm using the autoit tool as well as autoit scripting language in this scripting language it doesn't work properly for checkbox so I decide to use vb script for that solution so can you please help me for the solution here I attached my tool identifying the objects of checkbox.I'm using the (Frozen)Autoit v3 Window info tool for spying the objects. |