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
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty how to automate tests through selenium?

Thu Jun 28, 2012 1:28 pm
hii...
I wanted to know that how do I automate testing with the help of Selenium? I have a few html5 modules which i ran on the browser, and now I have to automate my tests so that my colleagues who are not aware with selenium can develop the automated tests with just a few clicks.
So please tell me how do i do that ???
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Fri Jun 29, 2012 4:41 pm
hello....
I recorded a test in Selenium IDE, and then exported it as a JUnit file.
I then opened the file using NetBeans.
but the code shows a few errors and does not support all the interfaces included.
I am also not able to write a main program in the code.
Please help me solving the error.
avatar
iautomate
Posts : 8
Join date : 2012-06-06
Location : Bengaluru

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Sun Jul 01, 2012 6:35 pm
Hi,

First of all if your colleagues are not familiar with Selenium they cant develop automated tests using it and next thing is it is always recommended to develop scripts instead of just doing a record and play since this method is going to create a lot of problems in maintaining your tests and its just a waste of time and money. Please consider learning the tool properly and then implementing the tests this will yield better results.
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 2:08 am
I started writing my own code for the tests in NetBeans. But it showed me errors that all files were not included. It also showed an error when I tried to declare an object of WebDriver.

So what all jar files am I supposed to include ??
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 2:10 am
Also, I had copied the code from the Internet, I do not understand it as of now. So can you please suggest or help me how to begin with it ??
avatar
iautomate
Posts : 8
Join date : 2012-06-06
Location : Bengaluru

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 11:04 am
I understand you are using java as your programming language , you can download the dependent libs from the below location. Extract the zip file and add the libs to your project in netbeans. I have never used netbeans i use eclipse as my IDE. Once you configure the project you can start writing your code. Knowledge of java is a must without which you cant proceed.

http://seleniumhq.org/download/
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 1:11 pm
I have a little knowledge about java. But I am confused on how to develop code for the tests.
Basically, I have to write code for testing html5 modules.

The textboxes and labels that have been declared on the html5 pade have ids, so can i use those ids in my java code and work with it? Or will I have to declare new variables for them in my java code ?
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 1:26 pm
After exporting my recorded selenium test to JUnit4(Webdriver) and opening it in NetBeans, I tried to run the code but it showed me an error regarding main class not found.
I tries defining the main class and creating an object of the class, but it still shows an error and I do not know how to proceed.

here is my code, can you please tell me what should I write in the main class???
--
I tries to send you my code in the message here, but I am not allowed to do that. So please let me know how to proceed further??
avatar
iautomate
Posts : 8
Join date : 2012-06-06
Location : Bengaluru

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 1:41 pm
This looks like an import error , please import all the jars and configure your classpath and add these jars and hopefully your issue will be resolved.
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 4:53 pm
I created the main class in a program and called the required funstions using the object.
But the following error comes up

Exception in thread "main" java.lang.RuntimeException: Could not contact Selenium Server; have you started it on 'localhost:4444' ?

Connection refused: connect
at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:104)
at com.example.tests.tets_introduction2.setUp(tets_introduction2.java:14)
at com.example.tests.tets_introduction2.main(tets_introduction2.java:39)
Java Result: 1
avatar
iautomate
Posts : 8
Join date : 2012-06-06
Location : Bengaluru

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 4:59 pm
I guess you are using the Selenium IDE and not the webdriver , I doubt i would not be able to help you on Selenium IDE since i have not worked on it. If you are starting a new project and not migrating your project i recommend you to go for webdriver as the Selenium IDE is depreciated and webdriver is much more advanced.
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 6:53 pm
so have can i start using WebDriver??
avatar
jaz
Active particpant
Active particpant
Posts : 10
Join date : 2012-06-27

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

Mon Jul 02, 2012 7:17 pm
When I use Selenium IDE, the tets are recorded and the logs are saved.
Is there anyway I can save those logs in a file or display it somewhere??
Sponsored content

how to automate tests through selenium? Empty Re: how to automate tests through selenium?

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