tag:blogger.com,1999:blog-9028922528361045176.post6569432131652039931..comments2024-03-27T10:13:03.251+05:30Comments on Road To Automation: Road to data driven testing in webdriver java TestNg Part 2Unknownnoreply@blogger.comBlogger29125tag:blogger.com,1999:blog-9028922528361045176.post-68649219994873321232015-10-20T11:25:08.107+05:302015-10-20T11:25:08.107+05:30it is because cell type is not verified.
you can c...it is because cell type is not verified.<br />you can check it in your code for it.<br /><br />switch(cell.getCellType()) {<br /> case Cell.CELL_TYPE_BOOLEAN:<br /> System.out.print(cell.getBooleanCellValue() + "\t\t");<br /> break;<br /> case Cell.CELL_TYPE_NUMERIC:<br /> System.out.print((int)cell.getNumericCellValue() + "\t\t");<br /> break;<br /> case Cell.CELL_TYPE_STRING:<br /> System.out.print(cell.getStringCellValue() + "\t\t");<br /> break;<br /> }Rajesh Ghttps://www.blogger.com/profile/12571618447437775849noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-7852087835729626732014-11-05T17:46:11.319+05:302014-11-05T17:46:11.319+05:30what is the format of data uve given in excel....g...what is the format of data uve given in excel....give the snaphot of excel file for referenceAnonymoushttps://www.blogger.com/profile/17944107595471925006noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-92172788236142516612014-04-16T11:15:42.833+05:302014-04-16T11:15:42.833+05:30Its really good...But having a doubt that if I wan...Its really good...But having a doubt that if I want to execute number of test cases by calling diifernet methods .<br />how can I do it?<br />Ex: if I need to execute 10 test cases by calling 3 or 4 different methods for each test case how can I do that?<br /><br />can you please provide me the sample code <br />Thanks in Advance<br />annils@ymail.comAnonymoushttps://www.blogger.com/profile/08453731429044134209noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-21868345578837861132014-04-10T02:01:56.916+05:302014-04-10T02:01:56.916+05:30Even though i changed the correct path and still i...Even though i changed the correct path and still i am getting null value for country , but its reading <br />String countryName = test[0];<br /> String countryDesc = test[1];<br />am seeing the value but the next line it shows null while debugging.<br /><br />what could be the issueAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-42409920783287899992014-04-08T12:16:09.544+05:302014-04-08T12:16:09.544+05:30Thanks to sharing this informative post.This code ...Thanks to sharing this informative post.This code works perfect.seohttp://linkssol.weebly.com/noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-20101009661222282092014-04-07T21:00:41.774+05:302014-04-07T21:00:41.774+05:30Please send me any of your application scripts for...Please send me any of your application scripts for reading the excel file, so that i can modify it to my s/w needs.<br />my email id is spradeep89@gmail.comAnonymoushttps://www.blogger.com/profile/03086574233377281115noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-60337433515928169782014-02-21T17:38:00.396+05:302014-02-21T17:38:00.396+05:30This code works perfect but if one of my column is...This code works perfect but if one of my column is numeric, it does not read the same. It throws an error. Can you please let me know a way to read both string and numeric values from excelAnonymoushttps://www.blogger.com/profile/10960071598457982066noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-16734159349131894782013-11-17T19:09:18.631+05:302013-11-17T19:09:18.631+05:30I need to start with keyword driven testing in my ...I need to start with keyword driven testing in my project, but I am stuck with, where to start from. <br /><br />Thanks<br />Kapish<br />nayanbkec@yahoo.comKKhttps://www.blogger.com/profile/01755654016066517938noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-35365895989640906192013-11-17T17:11:27.808+05:302013-11-17T17:11:27.808+05:30This comment has been removed by the author.KKhttps://www.blogger.com/profile/01755654016066517938noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-25874576651126361052013-11-17T17:07:09.807+05:302013-11-17T17:07:09.807+05:30The code is really working fine now for data drive...The code is really working fine now for data driven testing.KKhttps://www.blogger.com/profile/01755654016066517938noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-89539487869693961492013-08-20T10:12:34.644+05:302013-08-20T10:12:34.644+05:30i am passing path and sheet name using constructor...i am passing path and sheet name using constructor though it is reading data but my test script is skipped. i am getting below error.please provide me solution.<br /><br />Some DataProvider public static java.util.Iterator TestData.TestData_DataProvider.createData(java.lang.String,java.lang.String) throws java.io.IOException parameters unresolved: at 1 type class java.lang.String<br /> at 2 type class java.lang.String<br /><br />Below is the code <br /><br />//sample.java (test script)-- one class<br />//Static.java(dataprovider) -- separate class<br /><br /><br /> public class Sample<br /> {<br /> private WebDriver driver;<br /> private String baseUrl;<br />public Sample() throws IOException<br /> {<br /> try {<br /> Staticdata.createData("C:/WebDriverScripts/CIMA/src/TestData/CIMAData.xls","usernamelookup");<br /> <br /> }<br /><br /> catch(Exception ioe) { <br /> //ioe.printStackTrace(); <br /> } <br /> }<br /><br /> @BeforeMethod<br /> public void setUp() throws Exception {<br /> driver = new FirefoxDriver();<br /> baseUrl = "http://www.gmail.com";<br /> driver.get(baseUrl);<br /> driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);<br /> }<br /> @AfterMethod<br /> public void tearDown() throws Exception {<br /> driver.quit(); <br /> } <br /> <br /> <br /> @Test(dataProvider = "TestData",dataProviderClass= Staticdata.class) <br /> public void test_verifyData1(String n1,String n2) { <br /> // WebDriver driver = new FirefoxDriver();<br /> //driver.get("http://www.gmail.com");<br /> WebElement userName = driver.findElement(By.name("Email"));<br /> userName.sendKeys(n1);<br /> WebElement password = driver.findElement(By.name("Passwd"));<br /> password.sendKeys(n2);<br /> WebElement signin = driver.findElement(By.name("signIn"));<br /> signin.click();<br /> String expectedTitle = "Gmail";<br /> String actualTitle = driver.getTitle();<br /> AssertJUnit.assertEquals(actualTitle, expectedTitle);<br /> System.out.println(n1+" "+n2); } <br /> }<br /><br /><br />//Data provider<br />public class Staticdata {<br /> @DataProvider (name="TestData")<br /> public static Iterator createData(String path, String sheetname) throws IOException{ <br /> ArrayList myEntries = new ArrayList(); <br /> File inputWorkbook = new File(path); <br /> Workbook w; <br /> String Temp1, Temp2; <br /> try { <br /> w = Workbook.getWorkbook(inputWorkbook); <br /> Sheet sheet = w.getSheet(sheetname); <br /> for (int i = 1; i < sheet.getRows(); i++) { <br /> // column, row <br /> Cell cell = sheet.getCell(0, i); <br /> Temp1 = cell.getContents(); <br /> cell = sheet.getCell(1, i); <br /> Temp2 = cell.getContents(); <br /> myEntries.add(new Object [] {Temp1,Temp2}); <br /> } <br /> }<br /> catch (BiffException e)<br /> {e.printStackTrace();} <br /> System.out.println("Successfully read data file"); <br /> return myEntries.iterator(); <br /> } <br />}<br />harishhttps://www.blogger.com/profile/17458934777503350993noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-58451228090557270682013-08-19T00:40:11.539+05:302013-08-19T00:40:11.539+05:30Hi
You can pass XL sheet using constructor of cl...Hi <br /><br />You can pass XL sheet using constructor of class. <br /><br />I requested you to comment with your identity such as google Id.Adminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-46031836205366176852013-08-18T22:11:31.642+05:302013-08-18T22:11:31.642+05:30Hi Below is my requirement. please give your sugge...Hi Below is my requirement. please give your suggestion.<br /><br />i am reading data from XL Workbook for this i have created a dataprovider is separate class and calling that in my actual test script where data is to be read.<br />now i want to pass the sheet name from the test script to the dataprovider class so that same XL workbook can be used across all my test scripts.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-23840170832379925242013-08-17T20:51:07.230+05:302013-08-17T20:51:07.230+05:30As you see in above screen shot log is generated f...As you see in above screen shot log is generated for each set of data. Also it will show you in read mark for that set of data if failed.Adminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-78972040996753080222013-08-17T19:04:59.353+05:302013-08-17T19:04:59.353+05:30Thank you very much. but when test fails i will no...Thank you very much. but when test fails i will not know for which set of data my test fails. how to over come this?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-60457476220991519202013-08-17T16:19:40.383+05:302013-08-17T16:19:40.383+05:30Before some time I have created keyword driven web...Before some time I have created keyword driven webdriver framework but I have not used TestNG, executed all test methods using java main method by handling exception. <br />I will work on same and definitely will post on my blog. <br /><br />Thanks for reading my blogAdminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-67612899079922061562013-08-17T13:34:25.121+05:302013-08-17T13:34:25.121+05:30wanted some guidance on keyword-driven testing in ...wanted some guidance on keyword-driven testing in webdriver using java + testNG + apache poi.<br /><br />Searched lot on internet but got confused - how to start , how many files needed to to be created<br /><br />Thanks & regards<br />Kapish KumarKKhttps://www.blogger.com/profile/01755654016066517938noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-12477754261013371562013-08-15T21:20:10.632+05:302013-08-15T21:20:10.632+05:30You need to read post "Road to data driven t...You need to read post "Road to data driven testing in webdriver java Part 1” before this. I have not repeated "ReadXLS.java" class or sheet in this post. I have just mentioned link in this post. You click on mentioned link or you can go through below link.<br /><br />http://roadtoautomation.blogspot.in/2013/06/road-to-data-driven-testing-in.htmlAdminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-16010697939742516352013-08-15T21:08:36.850+05:302013-08-15T21:08:36.850+05:30U said u are reading data from XL sheet but where ...U said u are reading data from XL sheet but where is the XL sheet path?<br />i mean from where it is taking data?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-70366770354608315232013-08-14T21:20:36.383+05:302013-08-14T21:20:36.383+05:30What issue you are facing to implement from this p...What issue you are facing to implement from this post ?Adminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-60027542438488058852013-08-14T14:27:52.028+05:302013-08-14T14:27:52.028+05:30Please send me the scripts for reading the excel f...Please send me the scripts for reading the excel file<br />my email id is janak.315@gmail.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-78787974778864667952013-07-09T00:44:32.059+05:302013-07-09T00:44:32.059+05:30Hello Sagar
If you follow each step of above post...Hello Sagar<br /><br />If you follow each step of above post then you will be setup and create data driven webdriver test. you can put your data file where you need but best way to create a data folder at the root of your eclipse project and put there.Adminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-32774286837948461212013-07-08T14:22:17.774+05:302013-07-08T14:22:17.774+05:30how to configure datadriven framework under eclips...how to configure datadriven framework under eclipse .??????i mean where to place the property file and all.???Anonymoushttps://www.blogger.com/profile/09116646338805621751noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-74304292089264340112013-07-04T09:55:43.246+05:302013-07-04T09:55:43.246+05:30The script worked very well. Thanks for guiding.
...The script worked very well. Thanks for guiding.<br /><br />Thank you very muchKKhttps://www.blogger.com/profile/01755654016066517938noreply@blogger.comtag:blogger.com,1999:blog-9028922528361045176.post-56126037568861293842013-06-28T01:21:35.806+05:302013-06-28T01:21:35.806+05:30Are you passing correct data xls file? I guess tha...Are you passing correct data xls file? I guess that your are missing some thing so that unable to read data from xls file.<br /><br />I am sending a zip file for same scripts into your email ID just add required jars file and execute script. <br /> Adminhttps://www.blogger.com/profile/15096936763273601422noreply@blogger.com