Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
mhroy
Posts : 3
Join date : 2010-08-27

How to write in excel Empty 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!
avatar
metman
Amateur
Amateur
Posts : 58
Join date : 2010-04-02

How to write in excel Empty 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.
avatar
mhroy
Posts : 3
Join date : 2010-08-27

How to write in excel Empty Re: How to write in excel

Sat Aug 28, 2010 12:37 pm
metman wrote:Pretty sure you'll have to use something like http://poi.apache.org/
Didn't realize that it would be that difficult.

Thanks for the reply, metman!
Sponsored content

How to write in excel Empty Re: How to write in excel

Back to top
Permissions in this forum:
You cannot reply to topics in this forum