Skip to content

Commit c398689

Browse files
Adding documentation for Sauce Connnect
1 parent 4c4ecba commit c398689

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

sample-code/examples/python/sauce_connect.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def setUpWebServer(self):
6868

6969
def setUpTunnel(self):
7070
# Setting up Sauce Connect 4.x tunnel
71-
# May need to change ./sc/bin/sc depending on OS and directory structure
71+
# May need to change ./sc/bin/sc depending on OS and directory structure
7272
self.process = subprocess.Popen(['./sc/bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY'],
7373
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
7474
p = self.process
@@ -112,7 +112,14 @@ def setUp(self):
112112
'appiumVersion': '1.2.2',
113113
'name': 'Appium Python iOS Test (Sauce Connect)'
114114
}
115-
115+
'''
116+
When using Sauce Connect there are two options for sending commands to Sauce Labs. The first is
117+
sending commands to ondemand.saucelabs.com. The second it sending commands to host running Sauce Connect
118+
which will relay them to Sauce's infrastructure.
119+
Starting Sauce Connect the -P flag will determine which port Sauce Connect starts on, then it's just a matter
120+
of pointing the Remote WebDriver instance to
121+
"http://%s:%s@%s:80/wd/hub" % (SAUCE_USERNAME, SAUCE_ACCESS_KEY, SAUCE_CONNECT_HOST)
122+
'''
116123
self.driver = webdriver.Remote(
117124
desired_capabilities=desired_capabilities,
118125
command_executor="http://%s:%s@ondemand.saucelabs.com:80/wd/hub" % (SAUCE_USERNAME, SAUCE_ACCESS_KEY)

0 commit comments

Comments
 (0)