SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Nov 2005
    Location
    india
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to change the text to unicode format?

    Hi All,
    Plz help me out in this issue.
    I need to test my application on Japanese OS. In the flow i have to click on Yes button which displays in the Security Alert pop-up window. The Security Alert and Yes push button is displayed in Japanese Language. So i need to convert these to Unicode format so that the tool can able to activate the window and it clicks on the Yes push button.
    Provide me with your valuable suggestions.
    Regards,
    Mayur.

  2. #2
    Junior Member
    Join Date
    Dec 2005
    Location
    India
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the text to unicode format?

    Have you tried using the Recovery Scenario Manager?

    QTP is Unicode compliant, so using the object spy which also appears in the recovery scenario wizard should be able to solve the problem.

    I dont know how to convert japanese chars to unicode through QTP, but this site can convert them:
    http://www.pinyin.info/tools/convert...ninumbers.html
    ~ Mukesh ~

  3. #3
    Junior Member
    Join Date
    Nov 2005
    Location
    india
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the text to unicode format?

    Hi Mukesh,
    Thanks a lot.
    The link which is provided is working fine. The characters are changing to ASCII values. Now the problem is for every Japanese letter its giving a 6 digit ASCII no.
    Now the prb is how can we change directly a word(but not a single character) into this ASCII no and how the QTP can recognize these ASCII characters using the VB.
    Moreover others also feel free to help me out in this issue.
    Regards,
    Mayur.

  4. #4
    Junior Member
    Join Date
    Dec 2005
    Location
    India
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the text to unicode format?

    Mayur,

    When the security alert popup appears, the default button (the one thats clicked on pressing enter) is YES. So, instead of bothering about converting Unicode/Ascii, it will be a better idea to let QTP press the default button. This will cause no changes in future even if the target app language is changed from japanese to some other.

    To achieve this, define a recovery scenario for POP-UP (Tools>Recovery Scenario Manager). Use the object spy to identify the Security popup window.
    When asked, choose the option "Click the default button" option button.
    ~ Mukesh ~

  5. #5
    Junior Member
    Join Date
    Nov 2005
    Location
    india
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the text to unicode format?

    Hi Mukesh,
    I am very sorry to say this. Actually i don't want to use the Recovery Scenario. I need to handle the situation through coding itself. Moreover the onsite team is very much interested in coding this particular step.The Security Alert window consists of 3 Push buttons. Clicking of the Yes push button is not a problem, Handled this situation by using the location property. The text of the window i.e. Security Alert is displaying in Japanese language. For making this window to active state i am using the below code
    Browser("A").Dialog("text:=XXXXXX").Activate
    Here the text:=XXXXXX is displayed in Japanese. For this i want to keep this in an text file saved in unicode format and try to read from there otherwise keep it OR(Object Repository) and needs to access from there.
    Need of help from all the members of this group.
    Regards,
    Mayur.

  6. #6
    Junior Member
    Join Date
    Dec 2005
    Location
    India
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the text to unicode format?

    Originally posted by mayurkumar:

    i am using the below code
    Browser("A").Dialog("text:=XXXXXX").Activate
    Here the text:=XXXXXX is displayed in Japanese. For this i want to keep this in an text file saved in unicode format and try to read from there otherwise keep it OR(Object Repository) and needs to access from there.
    <font size="2" face="Verdana, Arial, Helvetica">If you copy the Japanese text and save in notepad (ms sans serif font suitable), it will preserve the chars as its unicode compatible.

    Also, I tried recording a basic script on a japanese website (http://travel.rakuten.co.jp) as below:

    Browser("【楽天トラベル】総合旅行予約サイト 宿泊予約").Page("【楽天トラベル】総合旅行予約サイト 宿泊予約").Link("お客さまの声").Click
    Browser("【楽天トラベル】総合旅行予約サイト 宿泊予約").Page("【楽天トラベル】お客さまの声").Sync

    (Although, QTP expert view displays properties as junk chars)

    I tried running the above script, and its running well.
    ~ Mukesh ~

  7. #7
    Junior Member
    Join Date
    Nov 2005
    Location
    india
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the text to unicode format?

    Hi Mukesh,
    Basically i want to save the property in text file. In the code i want call it from there i.e.
    Browser("ABC").Page("c:/textproperty.txt").Link("DEF").Click
    when the text file is stored in the c drive.
    I tried these approches its working fine for me also. But the requirement is said above.Any approach is there to solve this issue.
    Regards,
    Mayur.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:03 AM.

Copyright BetaSoft Inc.