You could store them in an .INI file and read this during your tests in your @BeforeClass using:

Preferences args = new IniFile(new File(fname));

Since my tests are coming from HP ALM and the testng-suite.xml is generated automatically, I simply added my as parameters into the XML.
You could also use to add the lines into your testng-suite.xml

<suite verbose="-1" name="TestAutomationTest.MBC-POS-Suite" configfailurepolicy="skip" preserve-order="true">
    <parameter name=".url" value="https://dfs.com" />

You can access them then in your test method, each parameter is one argument in your test method:

@Test
@Parameters({"selenium.url", "timeOut.msec"})
public void testMethod(String url, int timeout)



Source link https://sqa.stackexchange.com/questions/14892/how-to--arguments-to-selenium-from-autoit-

LEAVE A REPLY

Please enter your comment!
Please enter your name here