Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to get background color of a webelement whose class is iframe
#1
Not Solved
I used the following script to retrieve the background color:
Code:
MsgBox Browser.Page.Link.WebElement.Object.currentStyle.backgroundColor

But, it is displaying only "Transparent". The link's class name is iFrame.
I changed it to:
Code:
MsgBox Browser.Page.WebElement.Object.currentStyle.backgroundColor

Now the background is displayed as #fff. But the actual background color is orange.

Please suggest.
Reply
#2
Not Solved
Hi,

If u want to get the background color of a link as u have mentioned in "MsgBoxBrowser.Page.Link.WebElement.Object.currentStyle.backgroundColor" , then u can simply go for getRopropertyupports the background color for some objects like link.

U can try this
Code:
Browser("Welcome to Gmail").Page("Welcome to Gmail").Link("About Gmail").GetROProperty("background color")

Regards,
Sankalp
Reply
#3
Not Solved
Sankalp,
It is not working. blank text is displayed.

when i use the currentStyle am getting the value as transparent. Can i get the exact value of color.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object Class Name has changed in New OS(2012 R2) Raj Aryan Singh 0 781 12-12-2019, 03:57 PM
Last Post: Raj Aryan Singh
  Using Variables for calling a method in a class chitu576 0 1,752 12-05-2014, 12:31 AM
Last Post: chitu576
  How to identify color name using QTP Sourabh146 1 4,009 08-02-2013, 11:48 AM
Last Post: basanth27
  QTP locks up removes desktop background dj_wires 0 1,903 10-15-2012, 09:44 PM
Last Post: dj_wires
  Class not registered error razluv 3 6,779 09-14-2011, 11:43 AM
Last Post: SailajaKavi

Forum Jump:


Users browsing this thread: 1 Guest(s)