SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5

Thread: Object Frame

  1. #1
    Senior Member
    Join Date
    Oct 2006
    Location
    Norway
    Posts
    191
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Object Frame

    In my application, someone thought it might be a brilliant idea to have an external frame to use for adding text.

    In OR the Frame is of the "Class : Frame"

    When I try to set any text into the field, I get a errormessage that it does not support the method. Looking in the QTP help revealed that there is no method supporting dataentry. (as far as I could understand) They where:

    1) CaptureBitmap
    2) Check
    3) CheckProperty
    4) ChildObjects
    5) GetRO/TO
    6) Output
    7) SetTO
    8) ToString
    9) WaitProperty

    The code I tried was as simple as this:

    Browser("A").Page("B").Frame("FrameText").WebEleme nt("Description").Set "Insert this text into field please"

    Is there a workaround or something for this type of objects?
    - How many testers do you need to switch a light bulb? None, we just report it's dark -

  2. #2
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Frame

    Erik, the data entry isn't into your Frame looking at the code above, it's into a WebElement who's parent is a frame.

    One of our apps uses frames, using DP I interact with objects within the Frame, something like:

    With Browser("micClass:=Browser").Page("micClass:=Page" ).Frame("micClass:=Frame")

    .WebEdit("name:=Country").Set "England"
    .WebButton("value:=Submit").Click
    If Not .Webelement("innerText:=England").Exist Then
    .... blah blah blah


    Mark Smith.

    ----------------------
    - How many developers does it take to change a light bulb? None, it's a hardware problem.

  3. #3
    Senior Member
    Join Date
    Oct 2006
    Location
    Norway
    Posts
    191
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Frame

    After spying on the Input field for text, I could only find one id, which is "BODY". So I tried:

    Browser("micClass:=Browser").Page("micClass:=Page" ).Frame("micClass:=Frame").WebElement("html tag:=BODY").Set "Some text into field please"

    This throws the errormessage, "The object does not support given attribute or method: Browser().Page().Frame().WebElement().Set' (translated)

    Then I tried, just for fun to add more description: Index:=0

    Browser("micClass:=Browser").Page("micClass:=Page" ).Frame("micClass:=Frame").WebElement("html tag:=BODY", "index:=0").Set "Some text into field please"

    Got same error message

    Then I tried the exact example and wrote just as above:

    Browser("micClass:=Browser").Page("micClass:=Page" ).Frame("micClass:=Frame")

    .WebElement("html tag:=BODY", "index:=0").Set "Insert text please"
    If Not .Webelement("html tag:=BODY", "index:=0").Exist Then
    reporter.ReportEvent micFail, "Field does not exist", ""
    Else
    reporter.ReportEvent micPass, "Field exist", ""
    End if

    Same error

    I also tried with:

    With Browser("micClass:=Browser")... blablabla...

    Just to see if the "With" was relevant. Threw the errormessage : The test run cannot continue due to a syntax error.

    Fumbling in the dark... [img]/images/graemlins/smile.gif[/img]
    We need some people that can address the light bulb issue. [img]/images/graemlins/smile.gif[/img]
    - How many testers do you need to switch a light bulb? None, we just report it's dark -

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Frame

    Erik, have you tried low-level recording whilst you manually enter data in the frame?

    Try this and see if it plays back.

    Mark Smith.

    --------------------
    - How many Project managers do you need to switch a light bulb? None, we don't have a budget for this task.

  5. #5
    Senior Member
    Join Date
    Oct 2006
    Location
    Norway
    Posts
    191
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Object Frame

    I will try just for the fun of it to see how LLR works.

    But found an other workaround. Eliminate the whole mandatory field so Frame disappear.
    - How many testers do you need to switch a light bulb? None, we just report it's dark -

 

 

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 12.50%
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 05:32 AM.

Copyright BetaSoft Inc.