hi i m runing a login script using multiple data by importing
from excel sheet, now i want to get a status pass or fail each
time the script run for multiple data??
so anyone can help me out?
Answer Posted / meher dawlekar
Hi...
Answer for your question :
Ex : Flight Reservation Login with multiple data from the
excel sheet
Here i am taking the Excel sheet(meher.xls) having two
columns name 1.agentname
2.password,with multiple set of values in its respective rows
****************Script*****************************
option explicit
dim aname,pwd,sheetcount
datatable.addsheet"input"
datatable.importsheet"path of the source sheet with
sheetname with its extension.xls","meher","input"
sheetcount=datatable.getsheet("input").getRowcount
aname=datatable.value("agentname","input")
pwd=datatable.value("password","input")
For i= 1 to sheetcount step 1
Dialog("Login").winEdit("Agent Name:").set aname
Dialog("Login").winEdit("Password:").set pwd
Dialog("Login").winButton("OK").click
If Window("Flight Reservation").Exists Then
msgbox "Your Login status is Passed"
else
msgbox"Your Login status is Failed"
Endif
***********Hope you are cleared with my answer**********
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Is there any freeware tool for automation testing of mobile applications for BlackBerry and iPhone platforms ?
What are the main differences between Loadrunner and QTP tools? Describe briefly a "real world" scenario that would make you use the first one versus the other? Thank you for your answers....
I want to test a mobile software by an automation tool which is a IP telephony based software designed for both ios and android phone, basically this apps is develop for make call though few low cost audio codecs from Aircraft to Ground and Ground to Aircraft so anyone can suggest me which testing tool we can use for it
Name some of the commonly used automation testing tools that are used for non-functional automation.
Hi, Below is the code that i ran on selenium RC using eclipse IDE and java coding.: package source; import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; import com.thoughtworks.selenium.*; public class parameterized extends SeleneseTestCase { private Selenium browser; public static void main(String []args) { String arr[] = new String[5]; arr[0]= "bert"; arr[1]= "regular"; arr[2]= "copyonly"; arr[3]= "doert"; arr[4]= "inter"; parameterized obj = new parameterized(); obj.setUp(); obj.login_parameterize(arr); } @BeforeSuite public void setUp() { browser = new DefaultSelenium("localhost",4444, "*chrome", "http://goolge.com"); browser.start(); browser.open("http://goolge.com"); browser.waitForPageToLoad("30000"); browser.windowMaximize(); browser.open("/"); browser.click("gb_23"); } @Test public void login_parameterize(String[] arr ) { for(int i=0;i<=5;i++) { for(int j=0;j<=2; j++) { browser.type("//input[@id='Email']", arr[i]); browser.type("//input[@id='Passwd']", arr[i]); browser.click("//input[@id='signIn']"); browser.waitForPageToLoad("30000"); } } } public void EnterValuesIntoTextField_CheckWithGetValue() throws Exception { selenium.open("http://www.essaywriter.co.uk"); assertEquals("", selenium.getValue("id=textInput")); selenium.type("id=textInput", "Text In The Field"); assertEquals("Text In The Field", selenium.getValue("id=textInput")); } } When i ran this test i got an error which says: "Method login_parameterize requires 1 parameters but 0 were supplied in the @Test annotation." Any help is much appreciated. thank Gab
What are the pre-requisites to start automation testing?
Do you know how can we make one test method dependent on other using testng?
We have a testing assignment that is time-driven. Do you think automated tests are the best solution?
Tell me what is tsl? What 4gl is it similar too?
wat is database testing....how to develop data driven framework in selenium enviromnent. please explaing in detail
how to map requirements& test cases in quality center ???
List the five essential types of test steps?
wat would be the parameteries for ul testing for web applilcation
Hi I need the following information about JMeter 1) How many(max) threads(users) can hit the website using Jmeter? 2) How long(in hours) can we run Jmeter for stress test? (Is there any “Memory full” issue if we run for long time?) 3)What typeof sampler to use for clicking on the link?
What are the disadvantages of Hybrid framework