Skip to content

Commit cc0ebfb

Browse files
committed
commenting updated.
1 parent f2787c6 commit cc0ebfb

File tree

1 file changed

+36
-32
lines changed

1 file changed

+36
-32
lines changed

google-serach-lambdatest.py

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
1-
"""
2-
LambdaTest selenium automation sample example
3-
Configuration
4-
----------
5-
username: Username can be found at automation dashboard
6-
accessToken: AccessToken can be generated from automation dashboard or profile section
7-
8-
Result
9-
-------
10-
Execute Python Automation Tests on LambdaTest Distributed Selenium Grid
11-
"""
121
import unittest
132
import time
143
from selenium import webdriver
154
from selenium.webdriver.common.keys import Keys
165

176

18-
class LTAutomate(unittest.TestCase):
197

8+
class LTAutomate(unittest.TestCase):
209
"""
21-
Setup remote driver
22-
Params
10+
LambdaTest selenium automation sample example
11+
Configuration
2312
----------
24-
platform : Supported platform - (Windows 10, Windows 8.1, Windows 8, Windows 7, macOS High Sierra, macOS Sierra, OS X El Capitan, OS X Yosemite, OS X Mavericks)
25-
browserName : Supported platform - (chrome, firefox, Internet Explorer, MicrosoftEdge)
26-
version : Supported list of version can be found at https://www.lambdatest.com/capabilities-generator/
13+
username: Username can be found at automation dashboard
14+
accessToken: AccessToken can be genarated from automation dashboard or profile section
2715
2816
Result
2917
-------
18+
Execute Test on lambdatest Distributed Grid perform selenium automation based
3019
"""
20+
21+
3122
def setUp(self):
23+
"""
24+
Setup remote driver
25+
Params
26+
----------
27+
platfrom : Supported platfrom - (Windows 10, Windows 8.1, Windows 8, Windows 7, macOS High Sierra, macOS Sierra, OS X El Capitan, OS X Yosemite, OS X Mavericks)
28+
browserName : Supported platfrom - (chrome, firefox, Internet Explorer, MicrosoftEdge)
29+
version : Supported list of version can be found at https://www.lambdatest.com/capabilities-generator/
30+
31+
Result
32+
-------
33+
"""
3234
# username: Username can be found at automation dashboard
3335
username="{username}"
34-
# accessToken: AccessToken can be generated from automation dashboard or profile section
36+
# accessToken: AccessToken can be genarated from automation dashboard or profile section
3537
accessToken="{accessToken}"
3638
# gridUrl: gridUrl can be found at automation dashboard
3739
gridUrl = "beta-hub.lambdatest.com/wd/hub"
@@ -53,24 +55,25 @@ def setUp(self):
5355
# URL: https://{username}:{accessToken}@beta-hub.lambdatest.com/wd/hub
5456
url = "https://"+username+":"+accessToken+"@"+gridUrl
5557

56-
print("Initiating remote driver on platform: "+desired_cap["platform"]+" browser: "+desired_cap["browserName"]+" version: "+desired_cap["version"])
58+
print("Initiating remote driver on platfrom: "+desired_cap["platform"]+" browser: "+desired_cap["browserName"]+" version: "+desired_cap["version"])
5759
self.driver = webdriver.Remote(
5860
desired_capabilities=desired_cap,
5961
command_executor= url
6062
)
6163

62-
"""
63-
Setup remote driver
64-
Params
65-
----------
66-
Execute test: navigate google.com search LambdaTest
67-
Result
68-
-------
69-
print title
70-
"""
64+
7165
def test_search_in_google(self):
66+
"""
67+
Setup remote driver
68+
Params
69+
----------
70+
Execute test: navigate google.com search LambdaTest
71+
Result
72+
-------
73+
print title
74+
"""
7275
driver = self.driver
73-
print("Driver initiated successfully. Navigate url")
76+
print("Driver initiated sucessfully. Navigate url")
7477
driver.get("https://www.google.com/ncr")
7578

7679
print("Searching lambdatest on google.com ")
@@ -83,10 +86,11 @@ def test_search_in_google(self):
8386
driver.execute_script("lambda-status=passed")
8487
print("Requesting to mark test : pass")
8588

86-
"""
87-
Quit selenium driver
88-
"""
89+
8990
def tearDown(self):
91+
"""
92+
Quit selenium driver
93+
"""
9094
self.driver.quit()
9195

9296
if __name__ == "__main__":

0 commit comments

Comments
 (0)