Skip to main content

Hi,

Im trying to run tests for acumatica test sdk. I was able to make login into acumatica instance with code but code crashes when I try to open Sales Order screen with OpenScreen function. The issue is

OpenQA.Selenium.WebDriverException: 'javascript error: window.__siteMap.Workspaces is not iterable
      (Session info: chrome=119.0.6045.105)'

Hi @hotdok!

Have you double checked your Wrapper and Extension to make sure those are correctly setup?

Below is some sample code showing how to login to a site and then open the SOOrderEntry screen. If you are still  having issues try posting the code you are using and I can take look!

using Core.Config;
using Core.Core.Browser;
using Core.Login;
using Core.TestExecution;
using TestAcumatica;

namespace TestAutomationAcu.QuestionAnswer
{
public class LoginAndOpenSOEntryScreen : Check
{
public override void Execute()
{
using (TestExecution.CreateTestCaseGroup("Test example"))
{
Browser.StartingUrl = Config.SITE_DST_URL;
PxLogin LoginPage = new PxLogin();
LoginPage.Username.Type("admin");
LoginPage.Password.Type("123");
LoginPage.SignIn.Click();
SOOrderEntry soOrderEntryScreen = new SOOrderEntry();
soOrderEntryScreen.OpenScreen();
}
}
}
}

 


Hello @paengesser82 ,

Thanks for your response. I do not know how make sure my wrappers are correct but I used same  codegenerator version as acumatica one. Also as I said I was able to login into acumatica with my code (code just the same as you have) but when I try to execute

SO301000_SOOrderEntry_Extensions soScreen = new SO301000_SOOrderEntry_Extensions();
            soScreen.OpenScreen();

I got error from above. Also here are my class definitions
 

class SO301000_SOOrderEntry_Extensions : so301000_SOOrderEntry
{
public c_currentdocument_formfreightinfo currentDocument_formFreightInfo => CurrentDocument_formFreightInfo;

public c_firstselect_formactions firstSelect_FormActions => FirstSelect_FormActions;

public c_transactions_grid transactions_grid => Transactions_grid;
}

and begging of extension class

public class so301000_SOOrderEntry : Wrapper
{

public Note NotePanel;

public ActivityPanel ActivityPanel;

public SmartPanel_AttachFile FilesUploadDialog;

public PxToolBar ToolBar;

 


Thanks for posting your code @hotdok! The code looks good to me, I copied/pasted into my project and it worked just fine. My guess is your issue is either with the wrappers or something custom about your site.

I’d try the following

  1. If the wrapper you are using was not generated with the specific version of Acumatica you are trying to run the test against I’d regenerate it and see if that fixes your issues. Sometimes the wrappers generated for one version of Acumatica won't work for a different version.
     
  2. If that doesn’t work you can try and use the Wrappers Acumatica has already generated for you. To do that you need to first add the “generatedwrappers.acumatica…nupkg” nuget  package file in your test Visual Studio solution. Here is a picture of the file on my PC, it should be in the same location as the other TestSDK nuget packages.

-LHJwty_VALa2hWIvJNXZ-iHbPQ_9i1Snr0UJNtTy-5fJ4KTwsmgvFM-f5D_x_0rb92Xs1x0OG71B1kcN-qEA6B0uk5pzu110W_51QhNywgO-ES8BMZnMKyVl9sNO94cN_8X4thGmKQZ5dKh5uwAwRY

After you have referenced the nuget package then add the using statement for it and make your      extension class inherit from the “SO301000_SOOrderEntry” wrapper that comes with the package to see if that works.

using GeneratedWrappers.Acumatica; // This line is new

namespace TestAcumatica
{
class SO301000_SOOrderEntry_Extensions : SO301000_SOOrderEntry // This line is new
{
public c_currentdocument_formfreightinfo currentDocument_formFreightInfo => CurrentDocument_formFreightInfo;

public c_firstselect_formactions firstSelect_FormActions => FirstSelect_FormActions;

public c_transactions_grid transactions_grid => Transactions_grid;
}
}


 

  1. If neither of the above work, the next thing I’d try using fresh install of Acumatica to see if it might be a problem with the Acumatica instance itself.

If you need help with any of the steps let me know and I can give you some more detailed instructions. Otherwise if you try any of the above let me know how it goes!

Best of luck,
Philip Engesser

 


Thanks for helping. I added nuget packages from testsdk and it started to work with no problem


Reply