Ask a Question

Use of .getPropertyCSSValue()

SOLVED
userdanfoss
Occasional Contributor

Use of .getPropertyCSSValue()

How to get the exact value of css style in testcomplete ?

please check below image 

userdanfoss_0-1587929004867.png

 

i want to get border-width as thin

border-style as solid

border color as rgba(0,0,0,0.87)

border radius as 0px

 

i am using .getPropertCSSValue() please check below code:

 

var ObjectStyle = NameMapping.Sys.browser.pagePlus1Connect3.panelRoot.panel.panel.panel.panel.panel.panel.panel.panel.panel;
Log.Message(ObjectStyle.style.getPropertyCSSValue("border-width"));

 

getting error-

 

userdanfoss_1-1587929487135.png

 

 

1 REPLY 1
AlexKaras
Champion Level 3

Hi,

 

This method seems to be obsolete and might be not supported by the browser version you are using. Can you see it in the Object Browser for the selected web element?

Check https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/getPropertyCSSValue for additional details.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: