18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

What is the purpose of argument 'userDataDirectory'?

ilovepumpkinilovepumpkin Members
edited November -1 in Sahi - Open Source
I am using Java Client Driver. There is a argument 'userDataDirectory' in initJava method. It seems that it will generate several folders under the specified userdata folder like logs, certs, etc. However, after I running my tests, there are no any log files under logs folder (that's what I expected before). So I am curious why this argument is defined. Thanks.

Configuration.initJava(sahiBase, userDataDirectory);

Comments

  • Hi ilovepumpkin,

    UserDataDir is required to load userdata.properties file and to initialise the proxy in java mode.

    Regards
    Sumitra
  • I understand it is required but what's the consequence or impacts ? For example, I see Sahi creates logs folder but it does not generate any log files there. Should I expect this happens?

    BTW, when I use Java Client Driver, is there any method to let me see the same log files as I playback Sahi scripts?
  • Hello ilovepumpkin,

    The initjava method is a part of the global initialization method that is used to initialize the proxy. This method makes sure some important files/folders are available for Sahi during runtime.

    logs folder is also one such folder. However, logs wont be created when you run tests with the Java Driver. This driver can be used to write Java unit tests. You will have to use a unit testing framework like JUnit or TestNG to create XML or HTML based results.

    Regards,
    dkulkarni
  • Okay, I see. Thank you!
This discussion has been closed.