Unable to get a style property - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Unable to get a style property (/Thread-Unable-to-get-a-style-property) |
Unable to get a style property - gerfred - 07-19-2010 Hi, I try to test the visibility of an error tooltip. Once the tooltip was raise its associated object is already present in page but only visible in certain circumstances Using Firefox firebug, I can see the following informations: WHEN TOOLTIP IS VISIBLE : Code: <div id="dijit__MasterTooltip_0" widgetid="dijit__MasterTooltip_0" [color=#1E90FF]style="top: 288px; left: 459.5px; opacity: 1;"[/color] class="dijitTooltip dijitTooltipRight" WHEN TOOLTIP IS NOT VISIBLE : (only first div style change) Code: <div id="dijit__MasterTooltip_0" widgetid="dijit__MasterTooltip_0" [color=#1E90FF]style=""[/color] class="dijitTooltip dijitTooltipRight" Using QTP spy i am able to catch two objects related with the tooltip when visible: FIRST : Code: Browser("").Page("").WebElement("Alert message") with SECOND : Code: Browser("").Page("").WebElement("WebElement") with * this works fine but always return True Code: toolTipVisible = Browser("").Page("").WebElement("html tag:=DIV", "html id:=dijit__MasterTooltip_0").GetROProperty("visible") * this never works Code: style = Browser("").Page("").WebElement("html tag:=DIV", "html id:=dijit__MasterTooltip_0").GetROProperty("style") Is there any way to get div id="dijit__MasterTooltip_0" style informations ?? thanks RE: Unable to get a style property - Saket - 07-19-2010 try this Code: style = Browser("").Page("").WebElement("html tag:=DIV", "html id:=dijit__MasterTooltip_0").Object.Currentstyle does this help? RE: Unable to get a style property - gerfred - 07-19-2010 It does !!! but with Object.Currentstyle, top property was always set. I found a way using Object.style instead. And now, top is empty when tooltip is hidden. many thanks for this tip. |