| || |
Check a checkbox inside a table cell
I'm using UFT 12.01 to test a .NET application.
I need to instruct UFT to check a checkbox that is inside a table cell. Can you please help me?
I tried to record the action, but UFT didn't recognize the check box in the cell. The recorded action was:
I also tried with the description object:
Set oDesc = Description.Create
oDesc("Class Name").Value = "SwfCheckBox"
Set oObjs = SwfWindow().SwfTable().ChildObjects(oDesc)
For i = 0 to oObjs.Count - 1
x = oObjs(i).GetROProperty("swfname")
but there aren't child objects.
I tried to "Navigate and Learn", but no check box object was acquired. Same with ObjectSpy.
So, I'm stuck..
Does object spy recognize the checkbox?
I'm not sure if ChildObject will work for you. Notice that the function does not have an s at the end.
It is used for clicking on objects inside of a table.
Use ChildItem where you can specify control type as checkbox inside particular cell of the table, do check uft help example about it. It would resolve your issue.
Anand Tambey RSS Feed : Break To Make it Better
A Lazy person could be the best automation professional, if he is not lazy in implementing his ideas to reduce his work. ~Anand Tambey
.ChildItem sounds even better than .ChildObject
Hi all and thanks for your answers.
@cqao - No, objectspy doesn't recognize the checkbox.
Regarding .ChildItem method, I'm not sure if I can use it with .Net application.. I tried, but UFT says that method is not supported..
Can you please help me step by step?
ChildItem method isn't avaiable for the SwfTable object.
Use the Object Spy & post the type of grid i.e Microsoft / DevExpress etc ?
Sounds like you are working with .NET Windows Forms. If so, then you cannot use ObjectSpy. You'll have to use the .NET Windows Forms Spy (from the Tools menu).
All types of info on .NET Windows Forms in the UFT Help screen.
There are at least 5 different grid controls supported for this .NET Windows Forms so you can ask your Dev Team which one they used.
I think you can figure it out from there.
the grid is a C1flexgrid, not a .NET.
Both ObjectSpy and .NET Windows Forms Spy can't recognize the checkbox inside the cell.
I tried EVERYTHING, I'm running out of ideas.
I just checked the UFT 12.02 PAM (Product Availability Matrix) .pdf file and this ComponentOne (C1) FlexGrid is supported. (under Third Party .Net Controls)
You mentioned you were using UFT 12.01. If I were you, I will give UFT 12.02 plus the Patch 1 a try although I noticed that 12.01 also supports them.
If nothing else work, then you'll have to play around with work-arounds using low-level recording, DeviceReplay, SendKeys, Type, etc. trying to simulate what you can do using the keyboard/keystrokes.