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
nsaumini
Posts : 1
Join date : 2012-03-30

Export Test cases as Java Junit4 - Web Dirver Empty Export Test cases as Java Junit4 - Web Dirver

Fri Mar 30, 2012 1:26 pm
Hi

Using Selenium IDE can export to java source code.
How can I generate java source code programmatically using selenium API?

Thankx in advance
avatar
freesky
Amateur
Amateur
Posts : 72
Join date : 2011-04-13

Export Test cases as Java Junit4 - Web Dirver Empty Re: Export Test cases as Java Junit4 - Web Dirver

Wed Apr 18, 2012 4:45 pm
i also have this requirement. i wanted to generate java source code programmatically base on existing tool, unfortunately, i haven't found yet.

maybe we should generate selenium step first, then generate java file, e.g. the selenium step is : click a. the header of java source code is :
"import com.thoughtworks.selenium.*;\n" + ......
and the footer of java source code is : "@After\n" + "public void tearDown() throws Exception {\n" + "\tselenium.stop();\n" + "\tserver.stop();\n" + "}\n";.

and the selenium content is 'click a'.

then combine the header+content+footer to generate java file.

if you have better solution, please let me know, Thanks!
Back to top
Permissions in this forum:
You cannot reply to topics in this forum