Tell me more ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

i have started with selenium few weeks back. i have designed my test this way

  1. using @BeforeClass i am creating a object and calling a method of class which is opening the browser and performing a login operation.
  2. i have another method which has the selenium code for the test operation i want to perform, in my case boundary value analysis
  3. now i have created a @Test method which calls this previous method and passes values to it required for the test

The problem i am facing is 1. the browser is launched and the loging operation takes pace, after this the browser tries to open the the home page again. 2. I wanted to know if this is correct way to write selenium tests scripts

also if i remove the step 1 and include login method in step 2 my test runs fine I am using selenium-rc and STS on groovy on grails

share|improve this question
2  
You'll need to show code to get a proper answer. I would guess that the before class that is triggering for each test opens the browse and you don't have an after class that shuts down the browser. – Ardesco Apr 30 '12 at 13:05
This is an exact duplicate of their stackoverflow question: stackoverflow.com/questions/10383847/… – Scott May 1 '12 at 17:17
Thanks for the heads up Scott - I wasn't able to close the question as a duplicate as SE expects the dupe to be on the same site - but your link will be useful to anyone with the same issue. @kanishka-choudhury - am closing this, as the SO version has much more info and has already been answered, and there are no answers for this one yet. – testerab May 1 '12 at 22:02
No problem, I noticed that I couldn't flag it as a duplicate for that same reason. I think there is a question on meta about it, but I didn't do much reading. – Scott May 2 '12 at 14:19

closed as not a real question by testerab May 1 '12 at 21:53

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.