Forum Discussion

googleid_114550's avatar
googleid_114550
Occasional Contributor
10 years ago

VBScript vs. C# Script

Hi All,



I was wondering if anyone could provide information on VBScript and C# Script when automating a web application, is there any benefit to one over the other?



Thanks in advance.



2 Replies

  • Philip_Baird's avatar
    Philip_Baird
    Community Expert
    Hi Kevin, C# Script is just a restricted subset of JScript that limits accessors to square bracket notation.

     


    i.e instead of:


     


    object.method();


     


    you must use:


     


    object["method"]();


     


    The intended use for C# Script is for use in Connected Applications.




    If you are not using Connected Applications, there is no real point in using C# Script as you get no benefit.


     


    IMHO, in terms of Web Testing, JScript is the best choice.


     


    Regards,


    Phil Baird




  • Of those two choices I would go with VBScript, but given the choice of anything I would use JScript. C# isn't actual C# as you would expect and there is very little in the way of examples, documentation, etc to help you along the way if that is the direction you go.



    I find JScript to be the most robust so that would be my number one choice. If you are only choosing between VBScript and C# script, hands down VBScript.