Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delimeters in QTP Help Needed.

Status
Not open for further replies.

Rad999

Technical User
Nov 15, 2006
22
CA
P_File =DataTable("p_File", dtLocalSheet)
JavaWindow("Connected to .. fins003t:20216").JavaEdit("JTextArea").Set cstr(P_File)
P_File contains
35=D49=MY56=PEERS115=FIXTEST34=4657=FIXMAJ52=20061129-15:24:30.92511=SLF78900461=5120516163=664=20061129-15:24:3021=318=255=NT207=TO54=160=20050425-15:44:1738=2250040=244=1559=0377=N9176=Y10=0

I HAVE TO SEND THE ABOVE MESSAGE TO MY APPLICATION.
Problem is I am able to send the message but WITHOUT THE SQUARES.I used msgbox function to see if the message is picking up correctly from the datatable.It is picking the message correctly with SQUARES but when you click on send the message is displayed without the squares(delimeters)Qtp is inot recognising those.

If anyone could suggest anything that will help me move forward i will really appreciate it.
 
I am really not sure about this but I am taking a wild guess....give it a shot..... Put the whole in Double Quotes and try.

All the best. Pray that I dream of a better solution tonight...hehhehehehheeh
 
I did actually.It didnt workkkk.So hoping that you will come up with a very good solution.

 
I have tried various approaches to solve this issue but to no avail. The reason it fails is that the square delimiter is a non standard character and most of the applications are programmed to convert non standard character into their own character sets. In this particular case I see that the square is being converted into a space. Tried copy pasting into a webpage. I am sorry I could not find a solution but I found out a way to justify that this could not be done thru QTP (heheheheheheh). Read on....

5.4 Undisplayable characters
A user agent may not be able to render all characters in a document meaningfully, for instance, because the user agent lacks a suitable font, a character has a value that may not be expressed in the user agent's internal character encoding, etc.

Because there are many different things that may be done in such cases, this document does not prescribe any specific behavior. Depending on the implementation, undisplayable characters may also be handled by the underlying display system and not the application itself. In the absence of more sophisticated behavior, for example tailored to the needs of a particular script or language, we recommend the following behavior for user agents:

Adopt a clearly visible, but unobtrusive mechanism to alert the user of missing resources.
If missing characters are presented using their numeric representation, use the hexadecimal (not decimal) form since this is the form used in character set standards.


But if you come up with a solution please enlighten me with the same.

Cheers.
 
After going thru with qtp help ....i think it is possible to get the square boxes into the text after all.

The approach:
copy paste(or getroproperty text of the object)the code u want to enter into the datatable(the squares are converted into spaces in the excel sheet)
Array = Split("the text in the datatable","delimited by spaces")
SqBox = chr(169)'ASCII code for square box
Append all the entries in the array using for loop.
eg.
for i = 0 to ArrLen(length of the array)
strArr = Arr(i)+SqBox 'where strArr is a variable that stores the value that we need
i = i+1
next
JavaWindow("Connected to .. fins003t:20216").JavaEdit("JTextArea").Set strArr

Godspeed Radhika.
 
Hey,
Thanks a lot for taking in time to answer my Question.
I tried your ASCII (and a lot of other ASCII codes)first to see if it will generate square
SqBox = chr(169)'ASCII code for square box

It didnt instead it is generating( c in a circle).So I guess it doesnt work. So, will spend some more time to see if I can come up with a solution.

Thanks

 
sorry about that use this chr(143) instead of 169
 
Hi
I tried and it did work. I am able to send the message with delimeters.But the problem is with Functionality(Order is not generated).When I compared the original message with the new one I realised that there is some diff. in squares, but when you see them they look the same.So have to figure that out, but thanks to you cause I am able to send the message with the delimeters.
How long have you been working with QTP???
Once again Thanks A Lot.
 
Been working with it for the past 1 yr, what about you?
 
I am pretty new its been only 3 months..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top