SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Help Permission Denied Error when using dom

    Help! I sometimes get this error when I run my vb script in QTP 8.2. This is the full code below the error.

    Permission denied: 'Links'
    Line (153): "If Links(l).outertext = dataTable.Value("RepairShop") Then".

    Test Code
    Set Links = BrowserRef.object.all.tags("A")
    noLinks=Links.length

    For l = 0 to noLinks-1
    If Links(l).outertext = dataTable.Value("RepairShop") Then
    Links(l).click

    Wait(2)
    Exit For
    Else
    If l= noLinks-1 Then
    BrowserRef.Link("Request Field Assignment").Click
    End If
    End if
    Next

  2. #2
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help Permission Denied Error when using dom

    What is BrowserRef in your code?

    The following code works fine without any issues.

    Set Obj = Browser("Google").Page("Google").Object.all.Tags(" A")

    Msgbox Obj.Length

    For i = 1 To Obj.Length-1
    Msgbox Obj(i).OuterText
    Next

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help Permission Denied Error when using dom

    This is browseref.

    Set BrowserRef = Browser("Guidewire ClaimCenter").Page("Guidewire ClaimCenter").Frame("top_frame")

  4. #4
    Junior Member
    Join Date
    Oct 2006
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help Permission Denied Error when using dom

    Maybe it does not like the Links variable I am using. It might interefere with a dll name or something.

  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: Help Permission Denied Error when using dom

    This is because DOM is limited by cross domain security

    http://msdn2.microsoft.com/en-us/library/ms533028.aspx

  6. #6
    Junior Member
    Join Date
    Oct 2006
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help Permission Denied Error when using dom

    Thanks, I figured out the problem. As soon as I changed my variable name, it started working. I have another question that hopefully one of you may be able to help on. I am trying to open a browser and login into and application using nothing but vb script. In other words, I want to do this from a vbs file. I can open up a browser, but I am having issues accessing the username and password elements. Here is my code. Here is the code. Thanks in advance.


    Set objIE = CreateObject("InternetExplorer.Application")
    objIE.Visible = True

    objIE.Navigate url(don't want to put real url,internal website)

    Dim allElems
    Set allElems = objIE.document.getElementsByTagName("INPUT")

    For each elem in allElems
    Msgbox("I'm in!")
    if elem.label = "Username" then
    elem.value = "U1JC88"
    Exit For
    End if

    Next





    'Cleanup
    Set objIE = Nothing

  7. #7
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help Permission Denied Error when using dom

    You can generate login function with 3 or 4 lines of code in QTP.

    Is there any specific reason that you are using dom concept in your code? The disadvantage that i see with your code is you need to loop through collection of objects to find any single object.

    -Reddy

  8. #8
    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: Help Permission Denied Error when using dom

    fMerc, you are posting your question in too many thread. I have deleted both of them. Make sure you dont do that in future. In case you want everyone to look at your issue then just make a new post.

  9. #9
    Junior Member
    Join Date
    Oct 2006
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help Permission Denied Error when using dom

    Reddy,
    My supervisor is trying to create a script that will function just using vb script.


    Tarun,
    I wanted to delete my question in one of the posts, but was not sure of how. How do I do this?

  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: Help Permission Denied Error when using dom

    Edit -> Delete post

 

 
Page 1 of 2 12 LastLast

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 08:15 AM.

Copyright BetaSoft Inc.