Lettuce and Selenium newbie

72 views
Skip to first unread message

simi asaro

unread,
Jan 13, 2015, 3:30:08 PM1/13/15
to lettuc...@googlegroups.com
I am trying to test a lettuce/python test script with selenium on SauceLabs. I'm quite new to testing, in general, but know some python. The feature file is a simple go to url and see that a text exists. It passes for one platform/browser defined in desired_capabilites, but I want the one feature to enumerate through various platforms to test and close each one. 

I have a dict with all the various platforms:
browsers = [
            {"platform": "Windows 8.1",
             "version": "11",
             "browserName": "Internet Explorer",
             "name": "Windows 8.1 IE"},
            {"platform": "Linux",
             "version": "4.4",
             "browserName": "Android",
             "deviceName": "Google Nexus 7 HD Emulator",
             "name": "Android Chrome Nexus"},
            {"platform": "Linux",
             "version": "4.4",
             "browserName": "Android",
             "deviceName": "Android Emulator",
             "name": "Android Chrome Emulator"},
            {"platform": "OS X 10.9",
             "version": "7.1",
             "browserName": "iPhone",
             "name": "iOS Safari"},
            {"platform": "OS X 10.10",
             "version": "37",
             "browserName": "chrome",
             "name": "OSX Chrome"},
            {"platform": "Windows 7",
             "version": "3.0",
             "browserName": "Firefox",
             "name": "Windows 7 Firefox"},
            ]

How can I set this up in the terrain.py using the @before.all decorator for the browser setup but have each platform test the features close and open the new platform? Does this make sense?

Peter Eisenhower

unread,
Apr 7, 2016, 12:01:20 PM4/7/16
to Lettuce Users
See this exchange on git hub:  https://github.com/gabrielfalcao/lettuce/issues/68

From that response, What I am going todo to accomplish repeating tests on multiple browsers is use the enviroment. So set shell variable to "IE x" run lettuce. Change variable to "firefox" and run again. In the terrain i will check the variable and change the selium setup based on it. 
Reply all
Reply to author
Forward
0 new messages