Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if double quotes comes in outer html
#1
Not Solved
Hi

I want to identify my object using it's outer html property as given below

Browser("Title:=Arbitron Cross-Platform Campaign Analyzer").Page("Title:=Arbitron Cross-Platform Campaign Analyzer").Webelement("html tag:=TD","outerhtml:=<TD style="FONT-STYLE: normal; FONT-FAMILY: Arial Unicode MS, Arial, sans-serif; WHITE-SPACE: nowrap; COLOR: black; FONT-SIZE: 12px; VERTICAL-ALIGN: middle; FONT-WEIGHT: normal" align=left.*")

But you can see there is a double quotes inside outer html before the "FONT-STYLE".Also the word "normal" inside the outer html is a keyword for QTP.So these creating problems in identifying the object

Please help me in resolving these?
Reply
#2
Not Solved
escape char for double quotes is adding 2 more double quotes to it.
Try it...

Print """hi"""
it will print "hi"
Reply
#3
Not Solved
This is my code

and it still gives error after using ""

Code:
Browser("abc").Page("xyz") .WebElement("html tag:=SPAN","outerhtml:=<SPAN style=""COLOR: #1274c0; FONT-SIZE: 12px; FONT-WEIGHT: bold"">+(91)-22-61638369</SPAN>").Click

How to deal with this


Thanks
Sia
Reply
#4
Not Solved
Hi,

QTP even wont recognize few of the special charectors , u need to handle them also like a double quote. use '.'(dot) for sinle charector. here is the below expression that might work , also its better to recognize the object with 'class' , html id' rather than 'outer html'....try to use other properties as well.

Code:
Browser("abc").Page("xyz") .WebElement("html tag:=SPAN","outerhtml:=.SPAN style.""COLOR. .1274c0. FONT.SIZE. 12px. FONT.WEIGHT. bold""...91..22.61638369..SPAN.").Click
Thanks,
Harish
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Double click kiran664791 0 928 03-11-2023, 06:50 PM
Last Post: kiran664791
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,123 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  regular expression in html sujaravi123 0 2,308 12-31-2013, 03:00 PM
Last Post: sujaravi123
  Excel to HTML results keerthi286 1 2,701 04-19-2013, 08:21 AM
Last Post: basanth27
  Can I use html id as an unique identifier for all the components in a web page qtplearner88 8 8,482 05-21-2012, 06:52 PM
Last Post: falvi

Forum Jump:


Users browsing this thread: 2 Guest(s)