Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checkig color of an image???
#9
Not Solved
Hi Saket

Here I go , lot many questions and lot many doubts :

Looking at your reply I have tried these combinations. But nothing seems to be working properly:

1) Using Child Object mthod:
Code:
Dim obj_checkDesc, allchkvalues, singlechkvalue
[i]'Webelement description object[/i]
Set obj_checkDesc = Description.Create
obj_checkDesc("html tag").value = "TD"
obj_checkDesc("height").value = "23"
[i]'using the class name as object is in theChidItem Method[/i]
For i = o to 5
set a = browser("TalonPro Solutions").Page("TalonPro Solutions_2").Frame("Frame").WebTable("Property_2").ChildItem(2,7,obj_checkDesc, i)
msgbox a.currentStyle.backgroundColor
Next
The above statement throws me an error


2) Using descriptive programming
Code:
i= 2
[i]'Checking the existance od checkbox in each row [/i]
Do While Browser("TalonPro Solutions").Page("TalonPro Solutions_2").WebCheckBox("html tag:=INPUT","type:=checkbox", "index:="&i).Exist

[i]'Checking the webelement in each column [/i]
For j = 5 to columcount
    objcolor = browser("TalonPro Solutions").Page("TalonPro Solutions_2").Frame("Frame").WebTable("Property_2").webelement("html tag:=TD","height:=23","index:="&j).Object.currentStyle.backgroundColor
    msgbox objcolor
     If  objcolor <> vacantcolor Then
         Exit for
         else

     End If
[i]'Check box checked after ecah column check[/i]
     Browser("TalonPro Solutions").Page("TalonPro Solutions_2").Frame("Frame").WebTable("Property_2").WebCheckBox("html tag:=INPUT","type:=checkbox", "index:="&i).set "ON"
Next
The above code works fine . But, it checks all the checkboxes irrespective of the color mismatch.

3) Getting Child Object
Code:
Dim obj_checkDesc, allchkvalues, singlechkvalue,objcolor
Set obj_checkDesc = Description.Create
obj_checkDesc("html tag").value = "TD"
obj_checkDesc("height").value = "23"
obj_checkDesc("outerhtml").value = ".*BORDER-RIGHT: 1px solid.*"

[i]'used this to get the child objects [/i]
Set allchkvalues = browser("TalonPro Solutions").Page("TalonPro Solutions_2").Frame("Frame").WebTable("Property_2").ChildObjects(obj_checkDesc)

[i]'Webelement count [/i]
countweb = browser("TalonPro Solutions").Page("TalonPro Solutions_2").Frame("Frame").WebTable("Property_2").ChildItemCount(5,8,"WebElement")
msgbox countweb

[i]' countweb: This always shows '0' value[/i]

For  i = 0 to countweb

objcolor = browser("TalonPro Solutions").Page("TalonPro Solutions_2").Frame("Frame").WebTable("Property_2").webelement(obj_checkDesc,"index:="&i).Object.currentStyle.backgroundColor
msgbox objcolor
Next
Please guide me which approach would be helpful and how to go with it ???

Thanks
Swetha
Reply


Messages In This Thread
Checkig color of an image??? - by swetha.b - 12-30-2009, 04:52 PM
RE: Checkig color of an image??? - by Saket - 12-30-2009, 05:19 PM
RE: Checkig color of an image??? - by swetha.b - 01-02-2010, 01:43 PM
RE: Checkig color of an image??? - by Saket - 01-04-2010, 10:16 AM
RE: Checkig color of an image??? - by bfakruddin - 01-04-2010, 12:36 PM
RE: Checkig color of an image??? - by Saket - 01-04-2010, 01:29 PM
RE: Checkig color of an image??? - by swetha.b - 01-04-2010, 06:17 PM
RE: Checkig color of an image??? - by Saket - 01-05-2010, 03:20 PM
RE: Checkig color of an image??? - by swetha.b - 01-06-2010, 07:07 PM
RE: Checkig color of an image??? - by Saket - 01-07-2010, 03:47 PM
RE: Checkig color of an image??? - by swetha.b - 01-09-2010, 10:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 1,113 06-17-2019, 12:19 PM
Last Post: Treirk
  Getting background color of an object on mouse over Surya 2 3,904 06-27-2018, 08:51 PM
Last Post: vensas3181
  How can we get the Windows application Text box background color Using UFT 11.53 Kuppampattu 3 6,033 06-06-2017, 11:12 AM
Last Post: workrohit08
  SwfTreeview - Color validation for child item YogeshCallappa 0 2,295 11-10-2016, 04:55 PM
Last Post: YogeshCallappa
  how to get background color of a WinButton javierchen 1 3,064 03-17-2015, 10:59 PM
Last Post: babu123

Forum Jump:


Users browsing this thread: 2 Guest(s)