Exception in ArtOfTest.WebAii

11 posts, 1 answers
  1. imran
    imran avatar
    8 posts
    Member since:
    Feb 2018

    Posted 14 Mar Link to this post

    I am getting this exception while automating using ArtOfTest.WebAii dll in VS2017, what could be the reason.

    threw exception: 
    System.TypeInitializationException: The type initializer for 'ArtOfTest.WebAii.Core.Settings' threw an exception. 
    ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, 
    Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

  2. Answer
    Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 16 Mar Link to this post

    Hi Imran,

    Thank you for reaching us out. 

    Could you please add the NewtonSoft.Json.dll into GAC. Please use the dll which is deployed with the Testing Framework installation - it could be found in the bin folder. The default installation path is C:\Program Files (x86)\Telerik\Test Studio\Bin if you have upgraded the product and C:\Program Files (x86)\Progress\Test Studio\Bin if you have performed a new installation. 

    You could double check the version of the dll in the bin folder and if it is the same as the one listed in the exception. 

    I hope this will work for you as well. Though in case of questions please let me know! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. imran
    imran avatar
    8 posts
    Member since:
    Feb 2018

    Posted 19 Mar in reply to Elena Tsvetkova Link to this post

    Thank You. It worked after adding to GAC.
  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 19 Mar Link to this post

    Hi Imran,

    Thanks for the feedback! I am pleased to know that worked for you! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. Farhaan
    Farhaan avatar
    5 posts
    Member since:
    Sep 2018

    Posted 11 Sep in reply to Elena Tsvetkova Link to this post

    hello Elena

    can you please help me to fix this "The type initializer for 'ArtOfTest.WebAii.Core.Settings' threw an exception."

    and how to use "settings mysettings = new settings();"

    if there are any reference to add or nuget package..

    Thanks 

     

  6. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 13 Sep Link to this post

    Hi Farhaan,

    Thank you for reaching us out. 

    Could you please provide the code that generates the listed error? It will be also helpful if you copy the whole message of the error if it contains any other information. 

    Please also let me know which is the version of Test Studio you are using and which Visual Studio you have on your machine? 

    Thanks in advance!

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  7. Farhaan
    Farhaan avatar
    5 posts
    Member since:
    Sep 2018

    Posted 13 Sep in reply to Elena Tsvetkova Link to this post

    hello elena 

    i am using visual studio 2015

    this is the code:

    Settings mySettings = new Settings();
                mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
                mySettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
                Manager myManager = new Manager(mySettings);

    and it getting only this error : The type initializer for 'ArtOfTest.WebAii.Core.Settings' threw an exception.

    i have copy paste the ArtOfTest.WebAii in the debug folder and add the reference to my project.

    thanking you if you could help me.

           

  8. Nikolai
    Admin
    Nikolai avatar
    106 posts

    Posted 14 Sep Link to this post

    Hi Farhaan,

    Based on your explanation it seems that you have referenced the ArtOfTest.WebAii.dll and ArtOfTest.WebAii.Design.dll but have you installed the Telerik Testing Framework/Test Studio on your machine or just copy/pasted the dlls? The error is usually associated with either missing or broken installation. Can you please re-install and try again?
    Also there should be an InnerException for why the .net Runtime fails to load Settings type. 

    Hope this helps!

    Regards,
    Nikolai
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  9. Farhaan
    Farhaan avatar
    5 posts
    Member since:
    Sep 2018

    Posted 17 Sep in reply to Nikolai Link to this post

    Hi Nikolai 

    i will try re-install the telerik testing framework  plugin and also add the innerException.

    thank you for the explanation.

  10. Farhaan
    Farhaan avatar
    5 posts
    Member since:
    Sep 2018

    Posted 18 Sep Link to this post

    hi nikolai

    thanks for the explanation.

    it worked after adding the test studio and exception.

  11. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 18 Sep Link to this post

    Hi Farhaan,

    Thanks for the feedback! We are glad to know we were helpful! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top