Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with setUp method #41

Closed
emirozer opened this issue Jul 9, 2014 · 2 comments
Closed

Problem with setUp method #41

emirozer opened this issue Jul 9, 2014 · 2 comments

Comments

@emirozer
Copy link

emirozer commented Jul 9, 2014

Hello dear maintainers of python-client,

So i am kind of new to appium and having an issue.
I installed and launched the server, and i have written a script based on the simple ios test python example in the appium repo.

my setUp method is the first method in my class that has been derived from unittest.TestCase

def setUp(self):
        # set up appium
        app = os.path.join(os.path.dirname(__file__), 'iOS SDK Test.app')
        app = os.path.abspath(app)
        desired_caps = {}
        desired_caps['platformName'] = 'ios'
        desired_caps['platformVersion'] = '7.1'
        desired_caps['device'] = 'iPhone Simulator'
        desired_caps['deviceName'] = 'iPhone Retina (4-inch 64-bit)'
        desired_caps['app'] = app

        self.driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)

So when i launch the script that contains this method, nothing happens i get the default 'run 0 tests with blabla' output.
When i put the inside of this method out of the classes scope tho it works the simulator with the app launches but than again it is outside of the scope of the test class.

I have tried the same caps with the simple ruby script and it works over there..

Could you please englighten me either i am doing something wrong or this is an issue with the python client.

@sebv
Copy link
Member

sebv commented Jul 9, 2014

Maybe you need at least one test so that setUp is called.

@emirozer
Copy link
Author

emirozer commented Jul 9, 2014

@sebv I just realized and fixed the problem, i am sorry for opening up this issue.
The problem was that my test method's name did not started with the 'test_'..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants