SPONSORS:






User Tag List

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

    Variable uses an Automation type not supported

    Hello:
    When I run the following statement in Descriptive program:
    columnname = SwfWindow("name:=test").SwfTable("name=testTable") .GetCelldata(0,"name")
    It get error as below:
    "Variable uses an Automation type not supported in vbscript"
    I use vartype(columnnname) to get data type is 20.
    It did not supported in vbscript.
    In fact, it is nullable type in .net code.
    Is it only one way to change source code?
    Please help me.

    Thanks

  2. #2
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    [ QUOTE ]
    SwfWindow("name:=test").SwfTable("name=testTable").GetCelldata(0,"name")


    [/ QUOTE ]

    DP syntax for the SwfTable property is missing the ':' character, which might be the problem.

  3. #3
    Junior Member
    Join Date
    Jan 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    Thanks.
    I change it according to your suggestion, the result is also same:
    Changed Code as below:
    columnname = SwfWindow("name:=test").SwfTable("name:=testTable" ).GetCelldata(0,"name")

  4. #4
    Member
    Join Date
    Jan 2008
    Posts
    44
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    yes ur write...I think that might be the problem.

  5. #5
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    [ QUOTE ]
    SwfWindow("name:=test").SwfTable("name:=testTable").GetCelldata(0,"name")

    [/ QUOTE ]

    Online help (at least version 9.2) does not list an SwfTable property of "name". You are going to need to look at this carefully, and experiment, as most of us won't have a .NET Forms app or the .NET addin like you.

    Also your .GetCellData(0, "name") looks a bit suspicious (well, at least to me). I would use an absolute row, column index numbers to get this working initially, then change it use the string name of "name".

  6. #6
    Junior Member
    Join Date
    Jan 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    It maybe make you confussion.
    Actually,
    columnname = SwfWindow("name:=test").SwfTable("name:=testTable" ).GetCelldata(0,"name")
    It can pass, did not popup error message.

    when run the statement as below:
    MsgBox CStr(columnname)
    It popup the message
    "Variable uses an Automation type not supported in vbscript CStr(columnname)"

  7. #7
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    My previous comment still stands: online help (at least version 9.2) does not list an SwfTable property of name.

    Based on that reading of the help entry, you are going to have to use a valid property to reference the SwfTable in your statement.

  8. #8
    Junior Member
    Join Date
    Jan 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    Thanks.
    Another question:
    In QTP, how can I use the data type which type number is 20.
    I researched some documents. it did not support in VB script.
    What should I do if want to use it?

  9. #9
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Variable uses an Automation type not supported

    Sorry, but I don't understand your question.

  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: Variable uses an Automation type not supported

    Try different things here (Also i think GetCellData starts from index 1 and not 0)

    Msgbox
    SwfWindow("name:=test").SwfTable("name:=testTable" ).GetCelldata(1,"name")

    Msgbox IsNull(
    SwfWindow("name:=test").SwfTable("name:=testTable" ).GetCelldata(1,"name") )

    Msgbox IsObject(
    SwfWindow("name:=test").SwfTable("name:=testTable" ).GetCelldata(1,"name") )

    Then also try this with index if possible

    Msgbox SwfWindow("name:=test").SwfTable("name:=testTable" ).GetCelldata(1,1)

 

 
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 05:46 AM.

Copyright BetaSoft Inc.