JGeovani / robotium

Automatically exported from code.google.com/p/robotium
1 stars 0 forks source link

Some problems with teardown() . When you exit the procedure,there is a Popup window which let you confirm whether you sure to exit. #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.When you exit the  procedure,there is a Popup window which let you confirm 
whether you sure to exit.

2.I try to use the teardown() like this.but it does not close the procedure in 
the right way.
        public void tearDown() throws Exception{
            try{
                 solo.finalize();
            }
            catch(Throwable e){
                e.printStackTrace();
            }
            getActivity().finish();
            super.tearDown();
        }

3.I also try to use the teardown() like this. But when it finishs the first 
case and begins to start the second case ,it goes wrong.

        public void tearDown() throws Exception{
            try{
                 solo.goBack();
                 solo.clickOnButton("确定");
            }
            catch(Throwable e){
                e.printStackTrace();
            }
            getActivity().finish();
            super.tearDown();
        }

What version of the product are you using? On what operating system?
Robotium 2.1  Win7  SDK1.5

Original issue reported on code.google.com by chenmeng...@gmail.com on 16 Feb 2011 at 8:27

GoogleCodeExporter commented 9 years ago
What if you do:

public void tearDown() throws Exception{
            try{
                 solo.goBack();
                 solo.clickOnButton("确定"); 
                                 solo.finalize();    

            }
            catch(Throwable e){
                e.printStackTrace();
            }
            getActivity().finish();
            super.tearDown();
        }

Original comment by renasr...@gmail.com on 16 Feb 2011 at 8:30

GoogleCodeExporter commented 9 years ago
OK,thank you. 

Original comment by chenmeng...@gmail.com on 16 Feb 2011 at 2:48

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 16 Feb 2011 at 3:18