Posts: 4
Threads: 2
Joined: Jun 2013
Reputation:
0
06-04-2013, 02:02 AM
Hi My Questions is that does css or xpath helps only in identifying the objects in qtp meaning their location.
Because what I want to do I want to access properties like color, fontsize etc. which are not defined in object spy for firefox and Chrome.
How can we identify them?? Does CSS and XPath helps in that.
Posts: 323
Threads: 8
Joined: Nov 2011
Reputation:
4
06-04-2013, 12:36 PM
Use XPath and CSS to identify that will help to solve the problem
Posts: 4
Threads: 2
Joined: Jun 2013
Reputation:
0
06-06-2013, 12:17 AM
object identification is working fine with css but I want to access properties like color fontsize from css to qtp. how can i do it
Posts: 323
Threads: 8
Joined: Nov 2011
Reputation:
4
06-06-2013, 09:58 AM
In QTP in object identification table if the properties are not sufficient to locate a object We can add property to the list of added properties. But i am not using qtp 11 and i am also new to the xpath concept. You can try with that also
Posts: 516
Threads: 17
Joined: Jul 2009
Reputation:
3
06-06-2013, 10:14 PM
You can use the DOM [Document Object Model] in either the case you are specifying your test object location (either with xpath or CSS).
Once you have defined your object then type ".Object", now you can access all the properties that are defined in the HTML.
B.P.WebButton(your xpath/CSS).Object.-----
Let me know if you need any further help...
Thanks,
SUpputuri
Posts: 4
Threads: 2
Joined: Jun 2013
Reputation:
0
06-07-2013, 02:19 AM
Thanks Supputuri
I tried .Object.currentstyle works for IE not for Chrome and Firefox.
for Chrome and Firefox should I use getcomputedstyle to catch the style from computedstylesheet(color,fontsize etc.)