Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check if the checkbox is checked or not?
#1
Solved: 11 Years, 4 Months ago
Hi,

I have been trying this but did not find a solution by myself nor i could find in google.

when you goto--> IE brower-->Tools-->Internet options-->Advanced Tab-->Java(Sun)

There is a subitem under this java and i want to check if that checkbox is clicked.
When recording, it unchecks and checks which i dont want to do it.
I only want to check if it is not checked and if checked do nothing.

i tried this codeSystemUtil.Run "iexplore.exe
Code:
Browser("ie_Generic").WinToolbar("tb_ToolBar").Press "&Tools"
Browser("ie_Generic").WinMenu("wm_ContextMenu").Select "Internet Options..."
Browser("ie_Generic").Dialog("dlg_InternetOptions").WinTab("tb_SysTabCntrl").Select "Advanced"

Obj =  "Java (Sun);Use JRE 1.6.0_06 for <applet> (requires restart)"

State = Browser("ie_Generic").Dialog("dlg_InternetOptions").WinTreeView("tv_Settings").GetItemProperty(Obj, "ImageIndex")
If State = 0 Then
Browser("ie_Generic").Dialog("dlg_InternetOptions").WinTreeView("tv_Settings").Select "Java (Sun);Use JRE 1.6.0_06 for <applet> (requires restart)"
Browser("ie_Generic").Dialog("dlg_InternetOptions").WinButton("btn_Apply").Click
End If

I see that State has a value of empty no matter if that JRE 1.6.0.14 is checked or unchecked.

i tried using

Code:
State = Browser("ie_Generic").Dialog("dlg_InternetOptions").WinTreeView("tv_Settings").CheckItemProperty(item1,"selected",True)
Code:
State = Browser("ie_Generic").Dialog("dlg_InternetOptions").WinTreeView("tv_Settings").GetRoProperty("Checked")

nothing gives me a value all i get is empty.

Please help me as i tried a lot on this but i didnot get anything.

Thanks a lot
Reply
#2
Solved: 11 Years, 4 Months ago
checking Image index using GetItemProperty should work in this case.
I suspect there must be some error with your object declaration, can you check the node in question again?

Reply
#3
Solved: 11 Years, 4 Months ago
Well, I feel i am right in my approach.
Let me know where exactly i am wrong
Obj is "Use JRE 1.6.0_14 <applet> requires restart"
This is under Java(Sun)
Follow the path i gave and you will find what i am trying to look for.
please find a solution, i see that many others tried on this and did not get far.

All i want to see is whether "Use JRE 1.6.0_14 is checked or not under Java(sun)

Follow this path for better understanding
IE brower-->Tools-->Internet options-->Advanced Tab-->Java(Sun)

i get state=empty
no matter if it is checked or unchecked.
i need a value so that i can verify. please help on this.

thanks
prasanna
Reply
#4
Solved: 11 Years, 4 Months ago
well, I am not questioning on your approach, it is perfect here.
what I wanted to say to check whether you have used the proper Node text there in the below statement
Code:
Obj = "Java (Sun);Use JRE 1.6.0_06 for <applet> (requires restart)"

I can see in your post, you are pointing to "Use JRE 1.6.0_14 <applet> requires restart"
Just check if that is causing the issue.

Reply
#5
Solved: 11 Years, 4 Months ago
Hi saket,

You are right. i gave a little gap while spelling it and it didnot accept it. Now it works fine. Sorry for late reply. But i appreciate your concern. Thank you for taking great interest.

Prasanna
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to check Checkbox in SSDBGrid in windows application RamUFT 0 1,097 02-13-2020, 07:34 PM
Last Post: RamUFT
  Webtable Checkbox in UFT Syahirah 7 11,473 11-15-2017, 03:47 PM
Last Post: Ankur
  how to use DataTableGet on a checkbox. Is it possible? if not, what is the right appr jbelkin@gmail.com 1 2,860 08-02-2012, 10:23 AM
Last Post: sshukla12
  unable to identify Checkbox Property inside the WinList Object tech.savy987@gmail.com 2 4,285 07-20-2012, 10:18 AM
Last Post: Shridevi.Salagare
  Default value in Edit Box when Check Box is checked nacchio 2 5,105 07-18-2012, 12:21 PM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 1 Guest(s)