- mhroy
- Posts : 3
Join date : 2010-08-27
How to write in excel
Fri Aug 27, 2010 4:29 am
I have a simple Test Case named HomeIDE:
package com.example.tests;
import com.thoughtworks.selenium.*;
public class HomeIDE extends SeleneseTestCase {
public void setUp() throws Exception {
setUp("http://********.com/", "*firefox");
}
public void testHomeIDE() throws Exception {
selenium.open("/en/default.aspx");
verifyTrue(selenium.isTextPresent("Driven"));
}
}
How do I modify a code so the following excel file is created:
(first column) HomeIDE (second column) Passed
And if 'Driven' is absent then:
(first column) HomeIDE (second column) Failed
Thank you!
package com.example.tests;
import com.thoughtworks.selenium.*;
public class HomeIDE extends SeleneseTestCase {
public void setUp() throws Exception {
setUp("http://********.com/", "*firefox");
}
public void testHomeIDE() throws Exception {
selenium.open("/en/default.aspx");
verifyTrue(selenium.isTextPresent("Driven"));
}
}
How do I modify a code so the following excel file is created:
(first column) HomeIDE (second column) Passed
And if 'Driven' is absent then:
(first column) HomeIDE (second column) Failed
Thank you!
- metmanAmateur
- Posts : 58
Join date : 2010-04-02
Re: How to write in excel
Sat Aug 28, 2010 1:20 am
Pretty sure you'll have to use something like http://poi.apache.org/ to write results to an excell file. You'll have to either stop using verifyTrue or wrap it in a try/catch as well.
- mhroy
- Posts : 3
Join date : 2010-08-27
Re: How to write in excel
Sat Aug 28, 2010 12:37 pm
Didn't realize that it would be that difficult.metman wrote:Pretty sure you'll have to use something like http://poi.apache.org/
Thanks for the reply, metman!
Permissions in this forum:
You cannot reply to topics in this forum