Hello:
I started to use testNG a coupIe of days ago am attempting to integrate Selenium Web Driver and testNG.
I wrote a wrapper application to Selenium Web Driver and I am using testNG to invoke the methods of the wrapper application. But I am not sure how to run a method multiple times with different parameters from within the xml file.
The methods on the wrapper class are really generic for example: enterText(String elementName, String elementValue, boolean overWrite). So it can be reused and tests can easily created by editing the xml file.
Here is the xml file used by testNG which simulates a logging / logging out test to a website (Not sure how to call enterText twice with different parameters):
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Test Suite">
<test name="Functional Testing">
<classes>
<class name="autotest.AutoTester" preserve-order="true">
<methods>
<include name="startTest" />
<include name="navigateTo">
<parameter name="url" value="http://localhost"/>
<parameter name="pageLoadTimeout" value="pageLoadTimeout"/>
<include/>
<include name="enterText">
<parameter name="elementName" value="userName"/>
<parameter name="elementValue" value="admin"/>
<parameter name="overWrite" value="true"/>
<include/>
<include name="enterText">
<parameter name="elementName" value="password"/>
<parameter name="elementValue" value="password"/>
<parameter name="overWrite" value="true"/>
<include/>
<include name="clickLink">
<parameter name="linkName" value="Logout"/>
<include/>
<include name="submitForm"/>
<include name="finishTest" />
</methods>
</class>
</classes>
</test>
</suite>
Thanks
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/foSJ8Kd3DCUJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Thanks,
Roderick
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/9sufg1Wb5EoJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.