Unable to Run the Sample Project

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to Run the Sample Project

Ganesh Iyer
Hello All,

I tried importing the session 2 project to NetBeans and tried running the java class. I keep encountering the message, no Main method found. I am sure we do need a main method tou start the run, but in your session 2 both the java classes do not have the same. So do i need to write another java class with main method and create a instance(object).

Also I was trying to use the CSS & Xpath locators in chrome, can u plz tell me how to execute these in the browser like you did in your session. I tried but was not succesful in chrome.

Thanks,
Ganesh Iyer
Newbie to Selenium!!!
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Run the Sample Project

softwaretestingforum
Administrator
Hi Ganesh,

If you remember from session then I mentioned that we were using TestNG which takes care of executing tests, which mean there is main method in TestNG framework and you don't have to write one your self.
I have not worked with NetBeans and not sure how good TestNG support is for NetBeans. So if it is not a compulsion for you then I would suggest to use Eclipse.

About css and xPath execution in chrome. What error did you encounter? Did you bring the console on browser using F12 followed by escape key and write your locators?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Run the Sample Project

anand.dandekar
My eclipse is throwing error that it could not open jvm.cfg file. I looked into my JDK folder and it's gone. Has anybody had this issue before ? Do I have to install JDK again ?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Run the Sample Project

softwaretestingforum
Administrator
@Anand, you may like to try solution listed at -

http://stackoverflow.com/questions/6452203/unable-to-start-eclipse-cant-open-java-jre6-lib-i386-jvm-cfg
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Run the Sample Project

anand.dandekar
Thanks Tarun. I actually had 2 jres on my machine and my eclipse library was pointing to jre6 which did not have the same folder structure. I just added jre7 to my eclipse libraries through Configure Build Path and it worked.

I wonder how the original file got deleted though. This is strange. My old jre did not even have the folder it was specifying and it was working fine before. Anyway, it is working for me now.