SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Got error for Clicking Dynamic Link

    If Browser("Title:=.*","index:=0").Page(page1).WebTab le("Name:=Home").WebTable("Name:=Guarantor Information").WebTable("Name:=Name").Link("Name:=D elete").Exist Then
    Browser("Title:=.*","index:=0").Page(page1).WebTab le("Name:=Home").WebTable("Name:=Guarantor Information").WebTable("Name:=Name").Link("index:= 0").Click
    else
    msgbox "there r no guarantors"
    end if


    the link properties r by using object spy
    Browser->Page->WebTable->WebTable->WebTable->Link

    but when i record that step
    the properties are
    Browser->Page->Link

    coming to my code
    i use dp for that link
    the link is dynamic that is changing every day so i use index
    but QTP skips that If statement

    why QTP doesn't not identify the WebTable

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    Janna, Well if you are talking about the consisteny in using object description and string description then you got it wrong. But if you are talking of the normal consistenct i.e. use DP on all child node statement after its started at one of node in the statement then Yes.

    Below code will work fine
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Set oPage=Description.Create
    oPage(&quot;micClass&quot.value=&quot;Page&quot;
    Browser(&quot;micClass:=Browser&quot.Page(oPage).WebEdit(&quot;name:=q&quot.Set &quot;Testing&quot;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  3. #3
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    yes u r correct tarun i followed the OR Hierarchy
    its working fine

    thanks&regords
    Lakshmi

  4. #4
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    Hi Tarun,
    Nice to disscuss with you.
    We are about the same :-}

    I mean:
    Browser("micClass:=Browser").Page(oPage).WebEdit(" name:=q") [oPage is taken from DescriptionObject]
    is the same as string description
    Browser("micClass:=Browser").Page("title:=SomeTitl e").WebEdit("name:=q")
    In both cases it works according correct hierarchy of objects and consistent description type.
    But what will not work:
    Browser(("micClass:=Browser").Page("pageName") [page is taken from OR]
    This case I'd name inconsistent description type of object.
    Right?

    Regards,
    Janna

  5. #5
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    Originally posted by jbotash:
    This case I'd name inconsistent description type of object.
    Right?
    <font size="2" face="Verdana, Arial, Helvetica">Yes.

  6. #6
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    Problem is not with WebTable identification.
    As I can see - you are using mixed (QTP and DP) identification in your code.
    In your case: .Page(page1) is taken from OR,
    but Browser("Title:=.*","index:=0") is your descriptive identification.
    Even if each of them is correct as separate value, it's not recognizable in this combination.
    Because, QTP can not find the Browser in OR, to identify the Page (defined in OR). Whatever is next in line - doesn't matter. Real failure is in this part.
    Parent of object from OR should be in OR also. Or both of them should be defined in DP.
    Fix this problem and WebTable will be recognized and 'If statement' will work.

    Good Luck
    Janna

  7. #7
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    Janna, i think you missed page1 and "page1". Page1 could be a description object and hope it is that only.

    Now coming to the problem. When you do a object spy on any of the object then you see its heirarchy in the page. But that does not mean you have to use the same in DP. The best way to identify is to add it to the OR and then convert it to DP by looking at the heirarchy obtained in the OR.

  8. #8
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    Tarun, you're right.
    Absolutely.
    Hierarchy is important, sure.
    And consistency of description type, also. Right?

    About page1...
    Analyzing the entire stile of code, I've assumed it's from OR.


    Regards
    Janna

  9. #9
    Member
    Join Date
    Jan 2006
    Location
    8343 priceton sq blvd e apt 1110, jacksonville fl 32256
    Posts
    81
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    if one more guarantor is added in the same loan any one means the link index is also changes

    what we have to do at that time

    yester day the page is
    Add Gurantor(s)
    jhone

    to day the page is

    Add Gurantors
    lilly
    jhone

    according to my script to day it takes lilly link
    not jhone link

  10. #10
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Got error for Clicking Dynamic Link

    You need to use the GetCellData function to get the name for which you want to click the Delete link and the relate the row# with index# of the link, which usually would row#-1 or row#-2 depending on whether the table has headers or not.

 

 

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.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:44 PM.

Copyright BetaSoft Inc.