From 2663135e11f947112a45d294fdad72ce3115766f Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 18:22:20 +0530
Subject: [PATCH 01/24] Update README.md

---
 README.md | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/README.md b/README.md
index 831b0d9..889b9cb 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,47 @@
 ![LambdaTest Logo](https://www.lambdatest.com/static/images/logo.svg)
 --- 
 
+## Prerequisites for Python Behave tutorial 
+
+### 1. Python Installation
+
+ * [Download Python](https://www.python.org/downloads/) and click on Add to path and install.
+ 
+ * To check if python installed correctly you need to go to terminal type python in command prompt. It will show you the current version you have downloaded.
+ 
+### 2. LambdaTest Credentials
+  * To use Pytest with LambdaTest, make sure you have the 2 environment variables LT_USERNAME and LT_ACCESS_KEY set. To obtain a username and access_key, sign up for free [here](https://lambdatest.com). After signing up you can find your username and access key [here](https://accounts.lambdatest.com/detail/profile).
+  * In the terminal export your LambdaTest Credentials as environmental variables:
+       
+       * For Mac/Linux
+            ```
+            $ export LT_USERNAME=<your LambdaTest username>
+            $ export LT_ACCESS_KEY=<your LambdaTest access key>
+            ```
+       
+       * For Windows
+            ```
+            set LT_USERNAME=<your LambdaTest username>
+            set LT_ACCESS_KEY=<your LambdaTest access key>
+            ```
+
+### 3. Setup
+
+ * Clone [Python-Behave-Selenium](https://github.com/LambdaTest/python-behave-selenium.git) from GitHub.
+ * Navigate to the cloned directory
+ * Install project dependencies by running command:
+ 
+ ```
+   pip install -r requirements.txt
+ ```
+ 
+ Requirements.txt file includes the following:
+ 
+ ```
+Paver==1.3.4
+selenium==3.141.0
+behave==1.2.6
+```
 ### Environment Setup
 
 1. Global Dependencies   

From 57a287bcc1cb9c50a670cc77f4f4c829535ff132 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 18:24:07 +0530
Subject: [PATCH 02/24] Update README.md

---
 README.md | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 889b9cb..32cf8b4 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@
 
 ### 3. Setup
 
- * Clone [Python-Behave-Selenium](https://github.com/LambdaTest/python-behave-selenium.git) from GitHub.
+ * Clone [Python-UnitTest-Selenium](https://github.com/LambdaTest/Python-UnitTest-Selenium.git) from GitHub.
  * Navigate to the cloned directory
  * Install project dependencies by running command:
  
@@ -39,9 +39,11 @@
  Requirements.txt file includes the following:
  
  ```
-Paver==1.3.4
-selenium==3.141.0
-behave==1.2.6
+ConfigParser
+selenium>2.5
+pytest
+nose
+pytest-xdist
 ```
 ### Environment Setup
 

From 7e9eaa1bb3c9cf56407cff7955f4fbcfe2f0d572 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 18:35:59 +0530
Subject: [PATCH 03/24] Update README.md

---
 README.md | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 32cf8b4..0e3618a 100644
--- a/README.md
+++ b/README.md
@@ -86,21 +86,33 @@ pytest-xdist
     $ python lambdatest_test.py or nosetests test_sample.py
     ```
 
-#####  Routing traffic through your local machine
-- Set tunnel value to `true` in test capabilities
+##  Routing traffic through your local machine using Lambdatest
+- Set tunnel value to `True` in test capabilities
 > OS specific instructions to download and setup tunnel binary can be found at the following links.
 >    - [Windows](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Windows)
 >    - [Mac](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+MacOS)
 >    - [Linux](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Linux)
 
+
+
+Below we see a screenshot that depicts our Pytest code is running over different browsers i.e Chrome, Firefox and Safari on the LambdaTest Selenium Grid Platform. The results of the test script execution along with the logs can be accessed from the LambdaTest Automation dashboard.
+
+
+![alttext](https://github.com/Apoorvlt/test/blob/master/Capture.PNG)
+
+
+
 ### Important Note:
-Some Safari & IE browsers, doesn't support automatic resolution of the URL string "localhost". Therefore if you test on URLs like "http://localhost/" or "http://localhost:8080" etc, you would get an error in these browsers. A possible solution is to use "localhost.lambdatest.com" or replace the string "localhost" with machine IP address. For example if you wanted to test "http://localhost/dashboard" or, and your machine IP is 192.168.2.6 you can instead test on "http://192.168.2.6/dashboard" or "http://localhost.lambdatest.com/dashboard".
+---
+- Some Safari & IE browsers, doesn't support automatic resolution of the URL string "localhost". Therefore if you test on URLs like "http://localhost/" or "http://localhost:8080" etc, you would get an error in these browsers. A possible solution is to use "localhost.lambdatest.com" or replace the string "localhost" with machine IP address. For example if you wanted to test "http://localhost/dashboard" or, and your machine IP is 192.168.2.6 you can instead test on "http://192.168.2.6/dashboard" or "http://localhost.lambdatest.com/dashboard".
 
 ## About LambdaTest
-
 [LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
 
 ### Resources
 
-##### [SeleniumHQ Documentation](http://www.seleniumhq.org/docs/)
-##### [UnitTest Documentation](https://docs.python.org/2/library/unittest.html)
+##### [Selenium Documentation](http://www.seleniumhq.org/docs/)
+
+##### [Python Documentation](https://docs.python.org/2.7/)
+
+##### [Pytest Documentation](http://pytest.org/latest/contents.html)

From 1f0c34b90260eb49a8e01f6ac94fb65a02bc9966 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 18:38:45 +0530
Subject: [PATCH 04/24] Update README.md

---
 README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0e3618a..3b9b703 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
 ![LambdaTest Logo](https://www.lambdatest.com/static/images/logo.svg)
 --- 
 
+![logo](https://github.com/Apoorvlt/test/blob/master/logo.PNG)
+
 ## Prerequisites for Python Behave tutorial 
 
 ### 1. Python Installation
@@ -98,7 +100,7 @@ pytest-xdist
 Below we see a screenshot that depicts our Pytest code is running over different browsers i.e Chrome, Firefox and Safari on the LambdaTest Selenium Grid Platform. The results of the test script execution along with the logs can be accessed from the LambdaTest Automation dashboard.
 
 
-![alttext](https://github.com/Apoorvlt/test/blob/master/Capture.PNG)
+![alttext](https://github.com/Apoorvlt/test/blob/master/unitcap.PNG)
 
 
 

From 64909e01a23b4b19ad06eae44275ca533ef1e9ba Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 18:39:26 +0530
Subject: [PATCH 05/24] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 3b9b703..953b88c 100644
--- a/README.md
+++ b/README.md
@@ -97,7 +97,7 @@ pytest-xdist
 
 
 
-Below we see a screenshot that depicts our Pytest code is running over different browsers i.e Chrome, Firefox and Safari on the LambdaTest Selenium Grid Platform. The results of the test script execution along with the logs can be accessed from the LambdaTest Automation dashboard.
+Below we see a screenshot that depicts our UnitTest code is running over different browsers i.e Chrome, Firefox and Safari on the LambdaTest Selenium Grid Platform. The results of the test script execution along with the logs can be accessed from the LambdaTest Automation dashboard.
 
 
 ![alttext](https://github.com/Apoorvlt/test/blob/master/unitcap.PNG)

From 384671874fd0e7815c283c199de77c618f39fdd0 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 22:02:19 +0530
Subject: [PATCH 06/24] Update README.md

---
 README.md | 39 +++++++--------------------------------
 1 file changed, 7 insertions(+), 32 deletions(-)

diff --git a/README.md b/README.md
index 953b88c..3c05cbc 100644
--- a/README.md
+++ b/README.md
@@ -47,38 +47,13 @@ pytest
 nose
 pytest-xdist
 ```
-### Environment Setup
-
-1. Global Dependencies   
-   
-   -Windows
-   * Download the latest python installer for Windows: http://sourceforge.net/projects/pywin32/files/pywin32/
-   * Run the installer and follow the setup wizard to install Python
-   
-   -Linux/Mac
-   * Run python --version to see which python version is currently installed, make sure it is 2.5.X or above.
-   * OS X, Ubuntu and most other Linux distro's come with Python pre-installed.
-   
-2. Lambdatest Credentials
-    * Set LambdaTest username and access key in environment variables. It can be obtained from [LambdaTest dashboard](https://automation.lambdatest.com/)    
-    example:
-    - For linux/mac
-    ```
-    export LT_USERNAME="YOUR_USERNAME"
-    export LT_ACCESS_KEY="YOUR ACCESS KEY"
-    
-    ```
-    - For Windows
-    ```
-    set LT_USERNAME="YOUR_USERNAME"
-    set LT_ACCESS_KEY="YOUR ACCESS KEY"
-    
-    ```
-3. Setup
-    * Clone [Python-UnitTest-Selenium](https://github.com/LambdaTest/Python-UnitTest-Selenium.git) from GitHub.
-    * Navigate to the cloned directory
-    * Install project dependencies by running command `pip install -r requirements.txt`
-    
+## Test Scenario
+
+### Single Test
+
+In our demonstration, we will be creating a script that uses the Selenium WebDriver to click check boxes and add button. If assert returns true, it indicates that the test case passed successfully and will show up in the automation logs dashboard else if assert returns false, the test case fails, and the errors will be displayed in the automation logs.
+
+You have successfully configured your project and are ready to execute your first UnitTest selenium testing script. Here is the  file for UnitTest selenium Testing. Lets call it <code>config.cfg</code>.
 4. Running Tests
     * To Start Test:
     - Navigate to Python-UnitTest-Selenium

From 3b791ec48aaf9ce19a889957b382d43b7f178653 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 22:04:24 +0530
Subject: [PATCH 07/24] Update README.md

---
 README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 65 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 3c05cbc..1f380db 100644
--- a/README.md
+++ b/README.md
@@ -53,14 +53,72 @@ pytest-xdist
 
 In our demonstration, we will be creating a script that uses the Selenium WebDriver to click check boxes and add button. If assert returns true, it indicates that the test case passed successfully and will show up in the automation logs dashboard else if assert returns false, the test case fails, and the errors will be displayed in the automation logs.
 
-You have successfully configured your project and are ready to execute your first UnitTest selenium testing script. Here is the  file for UnitTest selenium Testing. Lets call it <code>config.cfg</code>.
-4. Running Tests
-    * To Start Test:
-    - Navigate to Python-UnitTest-Selenium
-    - Run following command
-    * Execution
+You have successfully configured your project and are ready to execute your first UnitTest selenium testing script. Here is the  file for UnitTest selenium Testing. Lets call it <code>lambdatest_test.py</code>.
+
+```
+import os
+import unittest
+import sys
+from selenium import webdriver
+
+username = os.environ.get("LT_USERNAME")
+access_key = os.environ.get("LT_ACCESS_KEY")
+
+class FirstSampleTest(unittest.TestCase):
+
+    # setUp runs before each test case
+    def setUp(self):
+        desired_caps = {
+            "build": 'unittest sample build',
+            "name": 'Py-unittest',
+            "platform": 'Windows 10',
+            "browserName": 'firefox',
+            "version": '73'
+        }
+        self.driver = webdriver.Remote(
+           command_executor="http://{}:{}@hub.lambdatest.com:80/wd/hub".format(username, access_key),
+           desired_capabilities= desired_caps)
+
+
+# tearDown runs after each test case
+    def tearDown(self):
+        self.driver.quit()
+
+    def test_unit_user_should_able_to_add_item(self):
+        # try:
+        driver = self.driver
+
+        # Url
+        driver.get("https://lambdatest.github.io/sample-todo-app/")
+
+        # Click on check box
+        check_box_one = driver.find_element_by_name("li1")
+        check_box_one.click()
+
+        # Click on check box
+        check_box_two = driver.find_element_by_name("li2")
+        check_box_two.click()
+
+        # Enter item in textfield
+        textfield = driver.find_element_by_id("sampletodotext")
+        textfield.send_keys("Yey, Let's add it to list")
+
+        # Click on add button
+        add_button = driver.find_element_by_id("addbutton")
+        add_button.click()
+
+        # Verified added item
+        added_item = driver.find_element_by_xpath("//span[@class='done-false']").text
+        print (added_item)
+
+if __name__ == "__main__":
+    unittest.main()
+    
+ ```
+#### To run file  :
+
     ```
-    $ python lambdatest_test.py or nosetests test_sample.py
+    python lambdatest_test.py or nosetests lambdatest_test.py
     ```
 
 ##  Routing traffic through your local machine using Lambdatest

From de5011f3bbfd399037d0c0cfff4fe5347a2920f2 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Thu, 23 Apr 2020 22:06:17 +0530
Subject: [PATCH 08/24] Update README.md

---
 README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 1f380db..3e9e88d 100644
--- a/README.md
+++ b/README.md
@@ -117,9 +117,10 @@ if __name__ == "__main__":
  ```
 #### To run file  :
 
-    ```
-    python lambdatest_test.py or nosetests lambdatest_test.py
-    ```
+```
+ python lambdatest_test.py or nosetests lambdatest_test.py
+```
+ 
 
 ##  Routing traffic through your local machine using Lambdatest
 - Set tunnel value to `True` in test capabilities

From 7d8d35c71d05aff344d5187b28fc96577c5f38bd Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Mon, 26 Oct 2020 16:17:56 +0530
Subject: [PATCH 09/24] Add files via upload

---
 base_test.py | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 base_test.py

diff --git a/base_test.py b/base_test.py
new file mode 100644
index 0000000..282741f
--- /dev/null
+++ b/base_test.py
@@ -0,0 +1,73 @@
+from selenium import webdriver
+import unittest
+import os
+from configparser import ConfigParser
+ 
+caps={}
+ 
+class BaseTest(unittest.TestCase):
+    # ======================================================================
+    #            Setup and tear down functions
+    # ======================================================================
+ 
+    @classmethod
+    def setUpClass(self):
+ 
+        ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
+ 
+        self.config = ConfigParser()
+ 
+        my_file = ROOT_DIR + '\config.cfg'
+ 
+        self.config.read(my_file)
+ 
+        self.init_capabilities(self)
+ 
+        self.base_url = "https://lambdatest.github.io/sample-todo-app/"
+       
+        remote_url= "https://"+self.user_name+":"+self.app_key+"@hub.lambdatest.com/wd/hub"
+ 
+        caps['name'] = "LambdaTestSampleApp"
+ 
+        caps['build'] = "PythonUnitTestSample"
+ 
+        caps['browserName'] = "Chrome"      
+ 
+        caps['version'] = "71.0"
+ 
+        caps['platform'] = "Windows 10"
+ 
+        caps['network'] = True
+ 
+        caps['visual']= True
+ 
+        caps['video']= True
+ 
+        caps['console']= True
+ 
+ 
+        self.driver = webdriver.Remote(command_executor=remote_url,desired_capabilities=caps)
+ 
+        self.driver.implicitly_wait(30)
+ 
+        self.driver.maximize_window()
+ 
+        # open application url
+ 
+        self.driver.get(self.base_url)
+ 
+    @classmethod
+ 
+    def tearDownClass(self):
+ 
+        print ( "closed browser" )
+ 
+        self.driver.quit()
+ 
+    def init_capabilities(self):
+ 
+        
+        self.user_name = os.environ.get("LT_USERNAME")
+        self.app_key = os.environ.get("LT_ACCESS_KEY")
+        
+ 

From 73be0aa74b1acc8e1a37bb842c6cf5ce82740442 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Mon, 26 Oct 2020 16:18:46 +0530
Subject: [PATCH 10/24] Delete lambdatest_test.py

---
 lambdatest_test.py | 57 ----------------------------------------------
 1 file changed, 57 deletions(-)
 delete mode 100644 lambdatest_test.py

diff --git a/lambdatest_test.py b/lambdatest_test.py
deleted file mode 100644
index 36d894a..0000000
--- a/lambdatest_test.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import os
-import unittest
-import sys
-from selenium import webdriver
-
-username = os.environ.get("LT_USERNAME")
-access_key = os.environ.get("LT_ACCESS_KEY")
-
-class FirstSampleTest(unittest.TestCase):
-
-    # setUp runs before each test case
-    def setUp(self):
-        desired_caps = {
-            "build": 'unittest sample build',
-            "name": 'Py-unittest',
-            "platform": 'Windows 10',
-            "browserName": 'firefox',
-            "version": '73'
-        }
-        self.driver = webdriver.Remote(
-           command_executor="http://{}:{}@hub.lambdatest.com:80/wd/hub".format(username, access_key),
-           desired_capabilities= desired_caps)
-
-
-# tearDown runs after each test case
-    def tearDown(self):
-        self.driver.quit()
-
-    def test_unit_user_should_able_to_add_item(self):
-        # try:
-        driver = self.driver
-
-        # Url
-        driver.get("https://lambdatest.github.io/sample-todo-app/")
-
-        # Click on check box
-        check_box_one = driver.find_element_by_name("li1")
-        check_box_one.click()
-
-        # Click on check box
-        check_box_two = driver.find_element_by_name("li2")
-        check_box_two.click()
-
-        # Enter item in textfield
-        textfield = driver.find_element_by_id("sampletodotext")
-        textfield.send_keys("Yey, Let's add it to list")
-
-        # Click on add button
-        add_button = driver.find_element_by_id("addbutton")
-        add_button.click()
-
-        # Verified added item
-        added_item = driver.find_element_by_xpath("//span[@class='done-false']").text
-        print (added_item)
-
-if __name__ == "__main__":
-    unittest.main()

From 0d1abad0fc5a1bde1248cf93436a47c65601186b Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Mon, 26 Oct 2020 16:19:03 +0530
Subject: [PATCH 11/24] Add files via upload

---
 lambdatest_test.py | 62 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 lambdatest_test.py

diff --git a/lambdatest_test.py b/lambdatest_test.py
new file mode 100644
index 0000000..a79ab5a
--- /dev/null
+++ b/lambdatest_test.py
@@ -0,0 +1,62 @@
+import unittest, time, re
+import base_test
+from selenium import webdriver
+ 
+from selenium.webdriver.common.keys import Keys
+ 
+class LambdaTest(base_test.BaseTest):
+ 
+    def test_unit_user_should_able_to_add_item(self):
+ 
+        # try:
+ 
+        driver = self.driver
+ 
+        # Url
+ 
+        driver.get(self.base_url)
+ 
+        # Click on check box
+ 
+        check_box_one = driver.find_element_by_name("li1")
+ 
+        check_box_one.click()
+ 
+        # Click on check box
+ 
+        check_box_two = driver.find_element_by_name("li2")
+ 
+        check_box_two.click()
+ 
+        # Enter item in textfield
+ 
+        textfield = driver.find_element_by_id("sampletodotext")
+ 
+        textfield.send_keys("Yey, Let's add it to list")
+ 
+        # Click on add button
+ 
+        add_button = driver.find_element_by_id("addbutton")
+ 
+        add_button.click()
+ 
+        # Verified added item
+ 
+        added_item = driver.find_element_by_xpath("/html/body/div/div/div/ul/li[6]/span").text
+ 
+        print (added_item)
+
+        #Assertion 
+        if "Yey, Let's add it to list" in added_item:
+            driver.execute_script("lambda-status=passed")
+
+        else:
+            driver.execute_script("lambda-status=failed")
+            
+        
+ 
+
+ 
+if __name__ == "__main__":
+ 
+    unittest.main()

From de0cf4740da42d5895b7e2cc1c5e7798f5ce7595 Mon Sep 17 00:00:00 2001
From: Apoorvlt <62379718+Apoorvlt@users.noreply.github.com>
Date: Mon, 26 Oct 2020 16:20:07 +0530
Subject: [PATCH 12/24] Update README.md

---
 README.md | 76 ++++++++++++++++++++++++++++++-------------------------
 1 file changed, 41 insertions(+), 35 deletions(-)

diff --git a/README.md b/README.md
index 3e9e88d..f6ebc7a 100644
--- a/README.md
+++ b/README.md
@@ -56,63 +56,69 @@ In our demonstration, we will be creating a script that uses the Selenium WebDri
 You have successfully configured your project and are ready to execute your first UnitTest selenium testing script. Here is the  file for UnitTest selenium Testing. Lets call it <code>lambdatest_test.py</code>.
 
 ```
-import os
-import unittest
-import sys
+import unittest, time, re
+import base_test
 from selenium import webdriver
-
-username = os.environ.get("LT_USERNAME")
-access_key = os.environ.get("LT_ACCESS_KEY")
-
-class FirstSampleTest(unittest.TestCase):
-
-    # setUp runs before each test case
-    def setUp(self):
-        desired_caps = {
-            "build": 'unittest sample build',
-            "name": 'Py-unittest',
-            "platform": 'Windows 10',
-            "browserName": 'firefox',
-            "version": '73'
-        }
-        self.driver = webdriver.Remote(
-           command_executor="http://{}:{}@hub.lambdatest.com:80/wd/hub".format(username, access_key),
-           desired_capabilities= desired_caps)
-
-
-# tearDown runs after each test case
-    def tearDown(self):
-        self.driver.quit()
-
+ 
+from selenium.webdriver.common.keys import Keys
+ 
+class LambdaTest(base_test.BaseTest):
+ 
     def test_unit_user_should_able_to_add_item(self):
+ 
         # try:
+ 
         driver = self.driver
-
+ 
         # Url
-        driver.get("https://lambdatest.github.io/sample-todo-app/")
-
+ 
+        driver.get(self.base_url)
+ 
         # Click on check box
+ 
         check_box_one = driver.find_element_by_name("li1")
+ 
         check_box_one.click()
-
+ 
         # Click on check box
+ 
         check_box_two = driver.find_element_by_name("li2")
+ 
         check_box_two.click()
-
+ 
         # Enter item in textfield
+ 
         textfield = driver.find_element_by_id("sampletodotext")
+ 
         textfield.send_keys("Yey, Let's add it to list")
-
+ 
         # Click on add button
+ 
         add_button = driver.find_element_by_id("addbutton")
+ 
         add_button.click()
-
+ 
         # Verified added item
-        added_item = driver.find_element_by_xpath("//span[@class='done-false']").text
+ 
+        added_item = driver.find_element_by_xpath("/html/body/div/div/div/ul/li[6]/span").text
+ 
         print (added_item)
 
+        #Assertion 
+        if "Yey, Let's add it to list" in added_item:
+            driver.execute_script("lambda-status=passed")
+
+        else:
+            driver.execute_script("lambda-status=failed")
+            
+        
+ 
+
+ 
 if __name__ == "__main__":
+ 
     unittest.main()
+
     
  ```
 #### To run file  :

From 3704547598191472ae9464e774f37fbd419f3b09 Mon Sep 17 00:00:00 2001
From: Sirajuddin Khan <sirajuddinkhan88@gmail.com>
Date: Tue, 11 Jan 2022 13:11:18 +0530
Subject: [PATCH 13/24] Revert "Python-UnitTest-Selenium"

---
 README.md          | 189 +++++++++++----------------------------------
 base_test.py       |  73 -----------------
 lambdatest_test.py |  75 +++++++++---------
 3 files changed, 81 insertions(+), 256 deletions(-)
 delete mode 100644 base_test.py

diff --git a/README.md b/README.md
index f6ebc7a..831b0d9 100644
--- a/README.md
+++ b/README.md
@@ -2,159 +2,62 @@
 ![LambdaTest Logo](https://www.lambdatest.com/static/images/logo.svg)
 --- 
 
-![logo](https://github.com/Apoorvlt/test/blob/master/logo.PNG)
-
-## Prerequisites for Python Behave tutorial 
-
-### 1. Python Installation
-
- * [Download Python](https://www.python.org/downloads/) and click on Add to path and install.
- 
- * To check if python installed correctly you need to go to terminal type python in command prompt. It will show you the current version you have downloaded.
- 
-### 2. LambdaTest Credentials
-  * To use Pytest with LambdaTest, make sure you have the 2 environment variables LT_USERNAME and LT_ACCESS_KEY set. To obtain a username and access_key, sign up for free [here](https://lambdatest.com). After signing up you can find your username and access key [here](https://accounts.lambdatest.com/detail/profile).
-  * In the terminal export your LambdaTest Credentials as environmental variables:
-       
-       * For Mac/Linux
-            ```
-            $ export LT_USERNAME=<your LambdaTest username>
-            $ export LT_ACCESS_KEY=<your LambdaTest access key>
-            ```
-       
-       * For Windows
-            ```
-            set LT_USERNAME=<your LambdaTest username>
-            set LT_ACCESS_KEY=<your LambdaTest access key>
-            ```
-
-### 3. Setup
-
- * Clone [Python-UnitTest-Selenium](https://github.com/LambdaTest/Python-UnitTest-Selenium.git) from GitHub.
- * Navigate to the cloned directory
- * Install project dependencies by running command:
- 
- ```
-   pip install -r requirements.txt
- ```
- 
- Requirements.txt file includes the following:
- 
- ```
-ConfigParser
-selenium>2.5
-pytest
-nose
-pytest-xdist
-```
-## Test Scenario
-
-### Single Test
-
-In our demonstration, we will be creating a script that uses the Selenium WebDriver to click check boxes and add button. If assert returns true, it indicates that the test case passed successfully and will show up in the automation logs dashboard else if assert returns false, the test case fails, and the errors will be displayed in the automation logs.
-
-You have successfully configured your project and are ready to execute your first UnitTest selenium testing script. Here is the  file for UnitTest selenium Testing. Lets call it <code>lambdatest_test.py</code>.
-
-```
-import unittest, time, re
-import base_test
-from selenium import webdriver
- 
-from selenium.webdriver.common.keys import Keys
- 
-class LambdaTest(base_test.BaseTest):
- 
-    def test_unit_user_should_able_to_add_item(self):
- 
-        # try:
- 
-        driver = self.driver
- 
-        # Url
- 
-        driver.get(self.base_url)
- 
-        # Click on check box
- 
-        check_box_one = driver.find_element_by_name("li1")
- 
-        check_box_one.click()
- 
-        # Click on check box
- 
-        check_box_two = driver.find_element_by_name("li2")
- 
-        check_box_two.click()
- 
-        # Enter item in textfield
- 
-        textfield = driver.find_element_by_id("sampletodotext")
- 
-        textfield.send_keys("Yey, Let's add it to list")
- 
-        # Click on add button
- 
-        add_button = driver.find_element_by_id("addbutton")
- 
-        add_button.click()
- 
-        # Verified added item
- 
-        added_item = driver.find_element_by_xpath("/html/body/div/div/div/ul/li[6]/span").text
- 
-        print (added_item)
-
-        #Assertion 
-        if "Yey, Let's add it to list" in added_item:
-            driver.execute_script("lambda-status=passed")
-
-        else:
-            driver.execute_script("lambda-status=failed")
-            
-        
- 
-
- 
-if __name__ == "__main__":
- 
-    unittest.main()
-
+### Environment Setup
+
+1. Global Dependencies   
+   
+   -Windows
+   * Download the latest python installer for Windows: http://sourceforge.net/projects/pywin32/files/pywin32/
+   * Run the installer and follow the setup wizard to install Python
+   
+   -Linux/Mac
+   * Run python --version to see which python version is currently installed, make sure it is 2.5.X or above.
+   * OS X, Ubuntu and most other Linux distro's come with Python pre-installed.
+   
+2. Lambdatest Credentials
+    * Set LambdaTest username and access key in environment variables. It can be obtained from [LambdaTest dashboard](https://automation.lambdatest.com/)    
+    example:
+    - For linux/mac
+    ```
+    export LT_USERNAME="YOUR_USERNAME"
+    export LT_ACCESS_KEY="YOUR ACCESS KEY"
     
- ```
-#### To run file  :
-
-```
- python lambdatest_test.py or nosetests lambdatest_test.py
-```
- 
-
-##  Routing traffic through your local machine using Lambdatest
-- Set tunnel value to `True` in test capabilities
+    ```
+    - For Windows
+    ```
+    set LT_USERNAME="YOUR_USERNAME"
+    set LT_ACCESS_KEY="YOUR ACCESS KEY"
+    
+    ```
+3. Setup
+    * Clone [Python-UnitTest-Selenium](https://github.com/LambdaTest/Python-UnitTest-Selenium.git) from GitHub.
+    * Navigate to the cloned directory
+    * Install project dependencies by running command `pip install -r requirements.txt`
+    
+4. Running Tests
+    * To Start Test:
+    - Navigate to Python-UnitTest-Selenium
+    - Run following command
+    * Execution
+    ```
+    $ python lambdatest_test.py or nosetests test_sample.py
+    ```
+
+#####  Routing traffic through your local machine
+- Set tunnel value to `true` in test capabilities
 > OS specific instructions to download and setup tunnel binary can be found at the following links.
 >    - [Windows](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Windows)
 >    - [Mac](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+MacOS)
 >    - [Linux](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Linux)
 
-
-
-Below we see a screenshot that depicts our UnitTest code is running over different browsers i.e Chrome, Firefox and Safari on the LambdaTest Selenium Grid Platform. The results of the test script execution along with the logs can be accessed from the LambdaTest Automation dashboard.
-
-
-![alttext](https://github.com/Apoorvlt/test/blob/master/unitcap.PNG)
-
-
-
 ### Important Note:
----
-- Some Safari & IE browsers, doesn't support automatic resolution of the URL string "localhost". Therefore if you test on URLs like "http://localhost/" or "http://localhost:8080" etc, you would get an error in these browsers. A possible solution is to use "localhost.lambdatest.com" or replace the string "localhost" with machine IP address. For example if you wanted to test "http://localhost/dashboard" or, and your machine IP is 192.168.2.6 you can instead test on "http://192.168.2.6/dashboard" or "http://localhost.lambdatest.com/dashboard".
+Some Safari & IE browsers, doesn't support automatic resolution of the URL string "localhost". Therefore if you test on URLs like "http://localhost/" or "http://localhost:8080" etc, you would get an error in these browsers. A possible solution is to use "localhost.lambdatest.com" or replace the string "localhost" with machine IP address. For example if you wanted to test "http://localhost/dashboard" or, and your machine IP is 192.168.2.6 you can instead test on "http://192.168.2.6/dashboard" or "http://localhost.lambdatest.com/dashboard".
 
 ## About LambdaTest
+
 [LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
 
 ### Resources
 
-##### [Selenium Documentation](http://www.seleniumhq.org/docs/)
-
-##### [Python Documentation](https://docs.python.org/2.7/)
-
-##### [Pytest Documentation](http://pytest.org/latest/contents.html)
+##### [SeleniumHQ Documentation](http://www.seleniumhq.org/docs/)
+##### [UnitTest Documentation](https://docs.python.org/2/library/unittest.html)
diff --git a/base_test.py b/base_test.py
deleted file mode 100644
index 282741f..0000000
--- a/base_test.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from selenium import webdriver
-import unittest
-import os
-from configparser import ConfigParser
- 
-caps={}
- 
-class BaseTest(unittest.TestCase):
-    # ======================================================================
-    #            Setup and tear down functions
-    # ======================================================================
- 
-    @classmethod
-    def setUpClass(self):
- 
-        ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
- 
-        self.config = ConfigParser()
- 
-        my_file = ROOT_DIR + '\config.cfg'
- 
-        self.config.read(my_file)
- 
-        self.init_capabilities(self)
- 
-        self.base_url = "https://lambdatest.github.io/sample-todo-app/"
-       
-        remote_url= "https://"+self.user_name+":"+self.app_key+"@hub.lambdatest.com/wd/hub"
- 
-        caps['name'] = "LambdaTestSampleApp"
- 
-        caps['build'] = "PythonUnitTestSample"
- 
-        caps['browserName'] = "Chrome"      
- 
-        caps['version'] = "71.0"
- 
-        caps['platform'] = "Windows 10"
- 
-        caps['network'] = True
- 
-        caps['visual']= True
- 
-        caps['video']= True
- 
-        caps['console']= True
- 
- 
-        self.driver = webdriver.Remote(command_executor=remote_url,desired_capabilities=caps)
- 
-        self.driver.implicitly_wait(30)
- 
-        self.driver.maximize_window()
- 
-        # open application url
- 
-        self.driver.get(self.base_url)
- 
-    @classmethod
- 
-    def tearDownClass(self):
- 
-        print ( "closed browser" )
- 
-        self.driver.quit()
- 
-    def init_capabilities(self):
- 
-        
-        self.user_name = os.environ.get("LT_USERNAME")
-        self.app_key = os.environ.get("LT_ACCESS_KEY")
-        
- 
diff --git a/lambdatest_test.py b/lambdatest_test.py
index a79ab5a..36d894a 100644
--- a/lambdatest_test.py
+++ b/lambdatest_test.py
@@ -1,62 +1,57 @@
-import unittest, time, re
-import base_test
+import os
+import unittest
+import sys
 from selenium import webdriver
- 
-from selenium.webdriver.common.keys import Keys
- 
-class LambdaTest(base_test.BaseTest):
- 
+
+username = os.environ.get("LT_USERNAME")
+access_key = os.environ.get("LT_ACCESS_KEY")
+
+class FirstSampleTest(unittest.TestCase):
+
+    # setUp runs before each test case
+    def setUp(self):
+        desired_caps = {
+            "build": 'unittest sample build',
+            "name": 'Py-unittest',
+            "platform": 'Windows 10',
+            "browserName": 'firefox',
+            "version": '73'
+        }
+        self.driver = webdriver.Remote(
+           command_executor="http://{}:{}@hub.lambdatest.com:80/wd/hub".format(username, access_key),
+           desired_capabilities= desired_caps)
+
+
+# tearDown runs after each test case
+    def tearDown(self):
+        self.driver.quit()
+
     def test_unit_user_should_able_to_add_item(self):
- 
         # try:
- 
         driver = self.driver
- 
+
         # Url
- 
-        driver.get(self.base_url)
- 
+        driver.get("https://lambdatest.github.io/sample-todo-app/")
+
         # Click on check box
- 
         check_box_one = driver.find_element_by_name("li1")
- 
         check_box_one.click()
- 
+
         # Click on check box
- 
         check_box_two = driver.find_element_by_name("li2")
- 
         check_box_two.click()
- 
+
         # Enter item in textfield
- 
         textfield = driver.find_element_by_id("sampletodotext")
- 
         textfield.send_keys("Yey, Let's add it to list")
- 
+
         # Click on add button
- 
         add_button = driver.find_element_by_id("addbutton")
- 
         add_button.click()
- 
+
         # Verified added item
- 
-        added_item = driver.find_element_by_xpath("/html/body/div/div/div/ul/li[6]/span").text
- 
+        added_item = driver.find_element_by_xpath("//span[@class='done-false']").text
         print (added_item)
 
-        #Assertion 
-        if "Yey, Let's add it to list" in added_item:
-            driver.execute_script("lambda-status=passed")
-
-        else:
-            driver.execute_script("lambda-status=failed")
-            
-        
- 
-
- 
 if __name__ == "__main__":
- 
     unittest.main()

From 6745be4084ec067eeefe010aed6bb07c1a42162d Mon Sep 17 00:00:00 2001
From: Sirajuddin Khan <sirajuddinkhan88@gmail.com>
Date: Tue, 11 Jan 2022 13:12:07 +0530
Subject: [PATCH 14/24] Update lambdatest_test.py

---
 lambdatest_test.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lambdatest_test.py b/lambdatest_test.py
index 36d894a..259cd9e 100644
--- a/lambdatest_test.py
+++ b/lambdatest_test.py
@@ -12,10 +12,10 @@ class FirstSampleTest(unittest.TestCase):
     def setUp(self):
         desired_caps = {
             "build": 'unittest sample build',
-            "name": 'Py-unittest',
+            "name": 'Py-UnitTest',
             "platform": 'Windows 10',
             "browserName": 'firefox',
-            "version": '73'
+            "version": 'latest'
         }
         self.driver = webdriver.Remote(
            command_executor="http://{}:{}@hub.lambdatest.com:80/wd/hub".format(username, access_key),

From 0436963c1ee77648a3dec9200f1912f594ee5364 Mon Sep 17 00:00:00 2001
From: Sirajuddin Khan <sirajuddinkhan88@gmail.com>
Date: Tue, 11 Jan 2022 07:52:35 +0000
Subject: [PATCH 15/24] Fixes

---
 .gitignore         |  1 +
 .gitpod.yml        | 11 +++++++++++
 README.md          |  3 ++-
 lambdatest_test.py | 28 +++++++++++++++++++---------
 requirements.txt   |  2 +-
 5 files changed, 34 insertions(+), 11 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 .gitpod.yml

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ed8ebf5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+__pycache__
\ No newline at end of file
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 0000000..958d3a6
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,11 @@
+# This configuration file was automatically generated by Gitpod.
+# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
+# and commit this file to your remote git repository to share the goodness with others.
+
+tasks:
+  - init: pip install -r requirements.txt
+    command: python lambdatest_test.py && nosetests test_sample.py
+vscode:
+  extensions:
+    - ms-python.python
+
diff --git a/README.md b/README.md
index 831b0d9..b58ffd8 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,8 @@
     - Run following command
     * Execution
     ```
-    $ python lambdatest_test.py or nosetests test_sample.py
+    $ python lambdatest_test.py
+      nosetests lambdatest_test.py
     ```
 
 #####  Routing traffic through your local machine
diff --git a/lambdatest_test.py b/lambdatest_test.py
index 259cd9e..ddb073d 100644
--- a/lambdatest_test.py
+++ b/lambdatest_test.py
@@ -6,23 +6,31 @@
 username = os.environ.get("LT_USERNAME")
 access_key = os.environ.get("LT_ACCESS_KEY")
 
+
 class FirstSampleTest(unittest.TestCase):
 
     # setUp runs before each test case
     def setUp(self):
         desired_caps = {
-            "build": 'unittest sample build',
-            "name": 'Py-UnitTest',
-            "platform": 'Windows 10',
-            "browserName": 'firefox',
-            "version": 'latest'
+            'LT:Options': {
+                "user": username,
+                "accessKey": access_key,
+                "build": "UnitTest-Selenium-Sample",
+                "name": "UnitTest-Selenium-Test",
+                "platformName": "Windows 11",
+                "selenium_version": "4.0.0"
+            },
+            "browserName": "Chrome",
+            "browserVersion": "latest",
         }
+
         self.driver = webdriver.Remote(
-           command_executor="http://{}:{}@hub.lambdatest.com:80/wd/hub".format(username, access_key),
-           desired_capabilities= desired_caps)
+            command_executor="http://hub.lambdatest.com:80/wd/hub",
+            desired_capabilities=desired_caps)
 
 
 # tearDown runs after each test case
+
     def tearDown(self):
         self.driver.quit()
 
@@ -50,8 +58,10 @@ def test_unit_user_should_able_to_add_item(self):
         add_button.click()
 
         # Verified added item
-        added_item = driver.find_element_by_xpath("//span[@class='done-false']").text
-        print (added_item)
+        added_item = driver.find_element_by_xpath(
+            "//span[@class='done-false']").text
+        print(added_item)
+
 
 if __name__ == "__main__":
     unittest.main()
diff --git a/requirements.txt b/requirements.txt
index 48fe85a..6685d7b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 ConfigParser
-selenium>2.5
+selenium>4.0.0
 pytest
 nose
 pytest-xdist

From ea3014d1b90b2bfce84b9109b2412b8b5d88f634 Mon Sep 17 00:00:00 2001
From: 4msha <firdausia1345@gmail.com>
Date: Fri, 28 Jan 2022 20:34:51 +0530
Subject: [PATCH 16/24] Updated Readme

---
 README.md     | 118 ++++++++++++++++++++++++++------------------------
 dashboard.png | Bin 0 -> 385116 bytes
 2 files changed, 61 insertions(+), 57 deletions(-)
 create mode 100644 dashboard.png

diff --git a/README.md b/README.md
index b58ffd8..198b54a 100644
--- a/README.md
+++ b/README.md
@@ -1,64 +1,68 @@
-# Python-UnitTest-Selenium
-![LambdaTest Logo](https://www.lambdatest.com/static/images/logo.svg)
---- 
+# Python Unittest Selenium Sample
 
-### Environment Setup
+![MSTest](https://opengraph.githubassets.com/a8c8c224a50bf052e046550beee8262a40b03a6c3fef1f6448cba546f9f6ce05/LambdaTest/Python-UnitTest-Selenium)
 
-1. Global Dependencies   
-   
-   -Windows
-   * Download the latest python installer for Windows: http://sourceforge.net/projects/pywin32/files/pywin32/
-   * Run the installer and follow the setup wizard to install Python
-   
-   -Linux/Mac
-   * Run python --version to see which python version is currently installed, make sure it is 2.5.X or above.
-   * OS X, Ubuntu and most other Linux distro's come with Python pre-installed.
+## Prerequisites
+
+1. Install pip and python.
+
+```
+sudo apt install python-pip
+sudo apt install python
+```
+
+2. The recommended way to run your tests would be in virtualenv. It will isolate the build from other setups you may have running and ensure that the tests run with the specified versions of the modules specified in the requirements.txt file.
+
+```
+pip install virtualenv
+```
+
+## Steps to Run your First Test
+
+Step 1. Clone the Python-Unittest-Selenium Repository.
+
+```
+git clone https://github.com/LambdaTest/Python-UnitTest-Selenium.git
+```
+
+Step 2. Next we create and Activate the virtual environment in the Python-UnitTest-Selenium folder.
+
+```
+virtualenv venv
+source venv/bin/activate
+```
+
+Step 3. Then install required packages.
+
+```
+pip install -r requirements.txt
+```
+
+Step 4. Inside Python-UnitTest-Selenium, export the Lambda-test Credentials. You can get these from your automation dashboard.
+
+<p align="center">
+   <b>For Linux/macOS:</b>
    
-2. Lambdatest Credentials
-    * Set LambdaTest username and access key in environment variables. It can be obtained from [LambdaTest dashboard](https://automation.lambdatest.com/)    
-    example:
-    - For linux/mac
-    ```
-    export LT_USERNAME="YOUR_USERNAME"
-    export LT_ACCESS_KEY="YOUR ACCESS KEY"
-    
-    ```
-    - For Windows
-    ```
-    set LT_USERNAME="YOUR_USERNAME"
-    set LT_ACCESS_KEY="YOUR ACCESS KEY"
-    
-    ```
-3. Setup
-    * Clone [Python-UnitTest-Selenium](https://github.com/LambdaTest/Python-UnitTest-Selenium.git) from GitHub.
-    * Navigate to the cloned directory
-    * Install project dependencies by running command `pip install -r requirements.txt`
-    
-4. Running Tests
-    * To Start Test:
-    - Navigate to Python-UnitTest-Selenium
-    - Run following command
-    * Execution
-    ```
-    $ python lambdatest_test.py
-      nosetests lambdatest_test.py
-    ```
-
-#####  Routing traffic through your local machine
-- Set tunnel value to `true` in test capabilities
-> OS specific instructions to download and setup tunnel binary can be found at the following links.
->    - [Windows](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Windows)
->    - [Mac](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+MacOS)
->    - [Linux](https://www.lambdatest.com/support/docs/display/TD/Local+Testing+For+Linux)
-
-### Important Note:
-Some Safari & IE browsers, doesn't support automatic resolution of the URL string "localhost". Therefore if you test on URLs like "http://localhost/" or "http://localhost:8080" etc, you would get an error in these browsers. A possible solution is to use "localhost.lambdatest.com" or replace the string "localhost" with machine IP address. For example if you wanted to test "http://localhost/dashboard" or, and your machine IP is 192.168.2.6 you can instead test on "http://192.168.2.6/dashboard" or "http://localhost.lambdatest.com/dashboard".
+```
+export LT_USERNAME="YOUR_USERNAME"
+export LT_ACCESS_KEY="YOUR ACCESS KEY"
+```
+<p align="center">
+   <b>For Windows:</b>
+```
+set LT_USERNAME="YOUR_USERNAME"
+set LT_ACCESS_KEY="YOUR ACCESS KEY"
+```
+Step 5. To run your first test.
+```
+python lambdatest_test.py
+```
 
-## About LambdaTest
+## See the Results
 
-[LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
+You can check your test results on the [Automation Dashboard](https://automation.lambdatest.com/build).
+![Automation Testing Logs](https://github.com/LambdaTest/Python-UnitTest-Selenium/dashboard.png)
 
-### Resources
+## About LambdaTest
 
-##### [SeleniumHQ Documentation](http://www.seleniumhq.org/docs/)
-##### [UnitTest Documentation](https://docs.python.org/2/library/unittest.html)
+[LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
diff --git a/dashboard.png b/dashboard.png
new file mode 100644
index 0000000000000000000000000000000000000000..bbaa42bb9a39973df86059a979cadfc8334e72b7
GIT binary patch

From 9df4f42e10969488fd04cedb589b73e46d2a5108 Mon Sep 17 00:00:00 2001
From: Firdausia Fatima <57831632+4msha@users.noreply.github.com>
Date: Tue, 22 Feb 2022 16:31:48 +0530
Subject: [PATCH 17/24] Update README.md

SPacing edit + Widows Virtual Environment Setup.
---
 README.md | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/README.md b/README.md
index 198b54a..eb51f7f 100644
--- a/README.md
+++ b/README.md
@@ -27,11 +27,18 @@ git clone https://github.com/LambdaTest/Python-UnitTest-Selenium.git
 
 Step 2. Next we create and Activate the virtual environment in the Python-UnitTest-Selenium folder.
 
+For Linux/MacOS
 ```
 virtualenv venv
 source venv/bin/activate
 ```
 
+For Windows
+```
+python -m virtualenv venv
+venv\Scripts\activate.bat
+```
+
 Step 3. Then install required packages.
 
 ```
@@ -49,10 +56,12 @@ export LT_ACCESS_KEY="YOUR ACCESS KEY"
 ```
 <p align="center">
    <b>For Windows:</b>
+   
 ```
 set LT_USERNAME="YOUR_USERNAME"
 set LT_ACCESS_KEY="YOUR ACCESS KEY"
 ```
+   
 Step 5. To run your first test.
 ```
 python lambdatest_test.py

From f1f1b975ec8c53fb1f801e18a0ebd52b49c94d19 Mon Sep 17 00:00:00 2001
From: Salman Khan <70570645+salmanlt@users.noreply.github.com>
Date: Tue, 7 Jun 2022 06:37:37 +0530
Subject: [PATCH 18/24] Updated uniitest readme

---
 README.md | 204 ++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 159 insertions(+), 45 deletions(-)

diff --git a/README.md b/README.md
index eb51f7f..b316007 100644
--- a/README.md
+++ b/README.md
@@ -1,77 +1,191 @@
-# Python Unittest Selenium Sample
+# Run Selenium Tests With UnitTest On LambdaTest
 
-![MSTest](https://opengraph.githubassets.com/a8c8c224a50bf052e046550beee8262a40b03a6c3fef1f6448cba546f9f6ce05/LambdaTest/Python-UnitTest-Selenium)
+![171934563-4806efd2-1154-494c-a01d-1def95657383 (1)](https://user-images.githubusercontent.com/70570645/172273386-fa9606ac-3e63-4b2e-8978-3142add3e038.png)
 
-## Prerequisites
 
-1. Install pip and python.
+<p align="center">
+  <a href="https://www.lambdatest.com/blog/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium" target="_bank">Blog</a>
+  &nbsp; &#8901; &nbsp;
+  <a href="https://www.lambdatest.com/support/docs/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium" target="_bank">Docs</a>
+  &nbsp; &#8901; &nbsp;
+  <a href="https://www.lambdatest.com/learning-hub/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium" target="_bank">Learning Hub</a>
+  &nbsp; &#8901; &nbsp;
+  <a href="https://www.lambdatest.com/newsletter/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium" target="_bank">Newsletter</a>
+  &nbsp; &#8901; &nbsp;
+  <a href="https://www.lambdatest.com/certifications/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium" target="_bank">Certifications</a>
+  &nbsp; &#8901; &nbsp;
+  <a href="https://www.youtube.com/c/LambdaTest" target="_bank">YouTube</a>
+</p>
+&emsp;
+&emsp;
+&emsp;
 
-```
-sudo apt install python-pip
-sudo apt install python
-```
+*Learn how to run your Python automation testing scripts using UnitTest on the LambdaTest platform*
 
-2. The recommended way to run your tests would be in virtualenv. It will isolate the build from other setups you may have running and ensure that the tests run with the specified versions of the modules specified in the requirements.txt file.
+[<img height="58" width="200" src="https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png">](https://accounts.lambdatest.com/register)
 
-```
-pip install virtualenv
-```
 
-## Steps to Run your First Test
+## Table Of Contents
 
-Step 1. Clone the Python-Unittest-Selenium Repository.
+* [Pre-requisites](#pre-requisites)
+* [Run Your First Test](#run-your-first-test)
+* [Local Testing With UnitTest](#testing-locally-hosted-or-privately-hosted-projects)
 
-```
-git clone https://github.com/LambdaTest/Python-UnitTest-Selenium.git
-```
+## Prerequisites To Perform Unit testing In Python with Selenium
+
+Before you can start performing **Python** automation testing using **UnitTest**, you would need to:
+
+* Install the latest Python build from the [official website](https://www.python.org/downloads/). We recommend using the latest version.
+* Make sure **pip** is installed in your system. You can install **pip** from [here](https://pip.pypa.io/en/stable/installation/).
+* Download the latest **Selenium Client** and its **WebDriver bindings** from the [official website](https://www.selenium.dev/downloads/). Latest versions of **Selenium Client** and **WebDriver** are ideal for running your automation script on LambdaTest Selenium cloud grid.
+* Install **virtualenv** which is the recommended way to run your tests. It will isolate the build from other setups you may have running and ensure that the tests run with the specified versions of the modules.
 
-Step 2. Next we create and Activate the virtual environment in the Python-UnitTest-Selenium folder.
+```bash
+pip install virtualenv
+```
+### Installing Selenium Dependencies And Tutorial Repo
 
-For Linux/MacOS
+**Step 1:** Clone the LambdaTest’s Python-UnitTest-Selenium repository and navigate to the code directory as shown below:
+```bash
+git clone https://github.com/LambdaTest/Python-UnitTest-Selenium
+cd Python-UnitTest-Selenium
 ```
+**Step 2:** Create a virtual environment in your project folder the environment name is arbitrary.
+```bash
 virtualenv venv
+```
+**Step 3:** Activate the environment.
+```bash
 source venv/bin/activate
 ```
+**Step 4:** Install the [required packages](https://github.com/LambdaTest/Python-UnitTest-Selenium/blob/master/requirements.txt) from the cloned project directory:
 
-For Windows
-```
-python -m virtualenv venv
-venv\Scripts\activate.bat
+```bash
+pip install -r requirements.txt
 ```
+### Setting Up Your Authentication
 
-Step 3. Then install required packages.
+Make sure you have your LambdaTest credentials with you to run test automation scripts. You can get these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build) or by your [LambdaTest Profile](https://accounts.lambdatest.com/login).
 
-```
-pip install -r requirements.txt
-```
+**Step 5:** Set LambdaTest **Username** and **Access Key** in environment variables.
 
-Step 4. Inside Python-UnitTest-Selenium, export the Lambda-test Credentials. You can get these from your automation dashboard.
+* For **Linux/macOS**:
+  
+  ```bash
+  export LT_USERNAME="YOUR_USERNAME" 
+  export LT_ACCESS_KEY="YOUR ACCESS KEY"
+  ```
+  * For **Windows**:
+  ```bash
+  set LT_USERNAME="YOUR_USERNAME" 
+  set LT_ACCESS_KEY="YOUR ACCESS KEY"
+  ```
 
-<p align="center">
-   <b>For Linux/macOS:</b>
-   
+## Run Your First Test
+
+>**Test Scenario**: The [lambdatest_test.py](https://github.com/LambdaTest/pytest-selenium-sample/blob/master/tests/lt_sample_todo.py) sample script tests a simple to-do application with basic functionalities like mark items as done, add items in a list, calculate total pending items etc.
+
+
+### Configuration of Your Test Capabilities
+
+**Step 6:** In the test script, you need to update your test capabilities. In this code, we are passing browser, browser version, and operating system information, along with LambdaTest Selenium grid capabilities via capabilities object. The capabilities object in the above code are defined as:
+
+```python
+capabilities = {
+        "build": "UnitTest-Selenium-Sample",
+        "name": "UnitTest-Selenium-Test",
+        "platformName": "Windows 11",
+        "browserName": "Chrome",
+        "browserVersion": "latest",
+}
 ```
-export LT_USERNAME="YOUR_USERNAME"
-export LT_ACCESS_KEY="YOUR ACCESS KEY"
+You can generate capabilities for your test requirements with the help of our inbuilt [Desired Capability Generator](https://www.lambdatest.com/capabilities-generator/).
+
+
+### Executing The Test
+
+**Step 7:** Please execute the command below to run your tests:
+```bash
+python lambdatest_test.py
 ```
-<p align="center">
-   <b>For Windows:</b>
-   
+Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on LambdaTest automation dashboard. [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build) will help you view all your text logs, screenshots and video recording for your entire automation tests.
+
+## Testing Locally Hosted Or Privately Hosted Projects
+
+You can test your locally hosted or privately hosted projects with LambdaTest Selenium grid using LambdaTest Tunnel. All you would have to do is set up an SSH tunnel using tunnel and pass toggle `tunnel = True` via desired capabilities. LambdaTest Tunnel establishes a secure SSH protocol based tunnel that allows you in testing your locally hosted or privately hosted pages, even before they are live.
+
+Refer our [LambdaTest Tunnel documentation](https://www.lambdatest.com/support/docs/testing-locally-hosted-pages/) for more information.
+
+Here’s how you can establish LambdaTest Tunnel.
+
+Download the binary file of:
+* [LambdaTest Tunnel for Windows](https://downloads.lambdatest.com/tunnel/v3/windows/64bit/LT_Windows.zip)
+* [LambdaTest Tunnel for macOS](https://downloads.lambdatest.com/tunnel/v3/mac/64bit/LT_Mac.zip)
+* [LambdaTest Tunnel for Linux](https://downloads.lambdatest.com/tunnel/v3/linux/64bit/LT_Linux.zip)
+
+Open command prompt and navigate to the binary folder.
+
+Run the following command:
+
+```bash
+LT -user {user’s login email} -key {user’s access key}
 ```
-set LT_USERNAME="YOUR_USERNAME"
-set LT_ACCESS_KEY="YOUR ACCESS KEY"
+So if your user name is lambdatest@example.com and key is 123456, the command would be:
+
+```bash
+LT -user lambdatest@example.com -key 123456
 ```
-   
-Step 5. To run your first test.
+Once you are able to connect **LambdaTest Tunnel** successfully, you would just have to pass on tunnel capabilities in the code shown below :
+
+**Tunnel Capability**
+
 ```
-python lambdatest_test.py
+"tunnel" : true
 ```
 
-## See the Results
+## Documentation & Resources :books:
+
+      
+Visit the following links to learn more about LambdaTest's features, setup and tutorials around test automation, mobile app testing, responsive testing, and manual testing.
+
+* [LambdaTest Documentation](https://www.lambdatest.com/support/docs/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium)
+* [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium)
+* [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium)    
 
-You can check your test results on the [Automation Dashboard](https://automation.lambdatest.com/build).
-![Automation Testing Logs](https://github.com/LambdaTest/Python-UnitTest-Selenium/dashboard.png)
+## LambdaTest Community :busts_in_silhouette:
 
+The [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎
+
+## What's New At LambdaTest ❓
+
+To stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/) 
+      
 ## About LambdaTest
 
-[LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
+[LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.    
+
+### Features
+
+* Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
+* Real-time cross browser testing on 3000+ environments.
+* Test on Real device cloud
+* Blazing fast test automation with HyperExecute
+* Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
+* Smart Visual Regression Testing on cloud
+* 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
+* Automated Screenshot testing across multiple browsers in a single click.
+* Local testing of web and mobile apps.
+* Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
+* Geolocation testing of web and mobile apps across 53+ countries.
+* LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports
+
+    
+[<img height="58" width="200" src="https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png">](https://accounts.lambdatest.com/register)
+
+
+      
+## We are here to help you :headphones:
+
+* Got a query? we are available 24x7 to help. [Contact Us](support@lambdatest.com)
+* For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium)
+

From a14b3cd7d2c9bf95c4ed339da9f6c55bda880134 Mon Sep 17 00:00:00 2001
From: Devansh Bhardwaj <95698164+Devansh013@users.noreply.github.com>
Date: Thu, 16 Jun 2022 18:47:55 +0530
Subject: [PATCH 19/24] Updated UTM for UnitTest README File

---
 README.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index b316007..050c1fb 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,7 @@ pip install -r requirements.txt
 ```
 ### Setting Up Your Authentication
 
-Make sure you have your LambdaTest credentials with you to run test automation scripts. You can get these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build) or by your [LambdaTest Profile](https://accounts.lambdatest.com/login).
+Make sure you have your LambdaTest credentials with you to run test automation scripts. You can get these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium) or by your [LambdaTest Profile](https://accounts.lambdatest.com/login/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium).
 
 **Step 5:** Set LambdaTest **Username** and **Access Key** in environment variables.
 
@@ -99,7 +99,7 @@ capabilities = {
         "browserVersion": "latest",
 }
 ```
-You can generate capabilities for your test requirements with the help of our inbuilt [Desired Capability Generator](https://www.lambdatest.com/capabilities-generator/).
+You can generate capabilities for your test requirements with the help of our inbuilt [Desired Capability Generator](https://www.lambdatest.com/capabilities-generator/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium).
 
 
 ### Executing The Test
@@ -108,7 +108,7 @@ You can generate capabilities for your test requirements with the help of our in
 ```bash
 python lambdatest_test.py
 ```
-Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on LambdaTest automation dashboard. [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build) will help you view all your text logs, screenshots and video recording for your entire automation tests.
+Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on LambdaTest automation dashboard. [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium) will help you view all your text logs, screenshots and video recording for your entire automation tests.
 
 ## Testing Locally Hosted Or Privately Hosted Projects
 
@@ -154,7 +154,7 @@ Visit the following links to learn more about LambdaTest's features, setup and t
 
 ## LambdaTest Community :busts_in_silhouette:
 
-The [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎
+The [LambdaTest Community](https://community.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎
 
 ## What's New At LambdaTest ❓
 
@@ -186,6 +186,6 @@ To stay updated with the latest features and product add-ons, visit [Changelog](
       
 ## We are here to help you :headphones:
 
-* Got a query? we are available 24x7 to help. [Contact Us](support@lambdatest.com)
+* Got a query? we are available 24x7 to help. [Contact Us](support@lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium)
 * For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium)
 

From a3717b091d6bcdf0b7e69b1a32beb4e6f8074a98 Mon Sep 17 00:00:00 2001
From: Mukesh Rana <mukeshr@Admins-MacBook-Pro.local>
Date: Tue, 19 Jul 2022 13:54:23 +0530
Subject: [PATCH 20/24] restrict seleium version less than 4.3

---
 requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/requirements.txt b/requirements.txt
index 6685d7b..c7082ea 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 ConfigParser
-selenium>4.0.0
+selenium<4.3.0
 pytest
 nose
 pytest-xdist

From 71675aba6457831ad244cfbf037bf47d6a49972a Mon Sep 17 00:00:00 2001
From: Itsme-Parth <parthc2001@gmail.com>
Date: Mon, 12 Sep 2022 22:29:27 +0530
Subject: [PATCH 21/24] Smart UI Sample added

---
 lambdatest_test.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lambdatest_test.py b/lambdatest_test.py
index ddb073d..ddcfae5 100644
--- a/lambdatest_test.py
+++ b/lambdatest_test.py
@@ -18,12 +18,20 @@ def setUp(self):
                 "build": "UnitTest-Selenium-Sample",
                 "name": "UnitTest-Selenium-Test",
                 "platformName": "Windows 11",
-                "selenium_version": "4.0.0"
+                "selenium_version": "4.0.0",
+                #Enable Smart UI Project
+                # "smartUI.project": "<Project Name>",
             },
             "browserName": "Chrome",
             "browserVersion": "latest",
         }
 
+        # Steps to run Smart UI project (https://beta-smartui.lambdatest.com/)
+        # Step - 1 : Change the hub URL to @beta-smartui-hub.lambdatest.com/wd/hub
+        # Step - 2 : Add "smartUI.project": "<Project Name>" as a capability above
+        # Step - 3 : Run "driver.execute_script("smartui.takeScreenshot")" command wherever you need to take a screenshot 
+        # Note: for additional capabilities navigate to https://www.lambdatest.com/support/docs/test-settings-options/
+
         self.driver = webdriver.Remote(
             command_executor="http://hub.lambdatest.com:80/wd/hub",
             desired_capabilities=desired_caps)
@@ -49,6 +57,9 @@ def test_unit_user_should_able_to_add_item(self):
         check_box_two = driver.find_element_by_name("li2")
         check_box_two.click()
 
+        #Take Smart UI screenshot
+        #driver.execute_script("smartui.takeScreenshot")
+
         # Enter item in textfield
         textfield = driver.find_element_by_id("sampletodotext")
         textfield.send_keys("Yey, Let's add it to list")

From 2cc3e9108bfed2ef15ba183262c4e3a30926740e Mon Sep 17 00:00:00 2001
From: Sirajuddin Khan <sirajuddinkhan88@gmail.com>
Date: Tue, 29 Nov 2022 13:54:52 +0000
Subject: [PATCH 22/24] Updated Depedencies and readme nosetests command

---
 .gitpod.yml      | 2 +-
 README.md        | 2 +-
 requirements.txt | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitpod.yml b/.gitpod.yml
index 958d3a6..0d34fe7 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -4,7 +4,7 @@
 
 tasks:
   - init: pip install -r requirements.txt
-    command: python lambdatest_test.py && nosetests test_sample.py
+    command: nosetests lambdatest_test.py
 vscode:
   extensions:
     - ms-python.python
diff --git a/README.md b/README.md
index 050c1fb..57e5e42 100644
--- a/README.md
+++ b/README.md
@@ -106,7 +106,7 @@ You can generate capabilities for your test requirements with the help of our in
 
 **Step 7:** Please execute the command below to run your tests:
 ```bash
-python lambdatest_test.py
+nosetests lambdatest_test.py
 ```
 Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on LambdaTest automation dashboard. [LambdaTest Automation Dashboard](https://automation.lambdatest.com/build/?utm_source=github&utm_medium=repo&utm_campaign=python-unittest-selenium) will help you view all your text logs, screenshots and video recording for your entire automation tests.
 
diff --git a/requirements.txt b/requirements.txt
index c7082ea..1421ef7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 ConfigParser
-selenium<4.3.0
+selenium<3.13.0
 pytest
 nose
 pytest-xdist

From 582dd4218202d584ba86af56339fcc6f3eeec40e Mon Sep 17 00:00:00 2001
From: Himanshu Sheth <87163413+passionatedevtester@users.noreply.github.com>
Date: Wed, 31 May 2023 12:18:05 +0530
Subject: [PATCH 23/24] Update requirements.txt

Updation to Selenium 4.9.0
---
 requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/requirements.txt b/requirements.txt
index 1421ef7..1b82f10 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 ConfigParser
-selenium<3.13.0
+selenium<=4.9.0
 pytest
 nose
 pytest-xdist

From 8be56c1151a45b8215cbf72da23f7b3c2f0ecea7 Mon Sep 17 00:00:00 2001
From: Himanshu Sheth <87163413+passionatedevtester@users.noreply.github.com>
Date: Wed, 31 May 2023 12:21:33 +0530
Subject: [PATCH 24/24] Update lambdatest_test.py

---
 lambdatest_test.py | 43 +++++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/lambdatest_test.py b/lambdatest_test.py
index ddcfae5..663d76b 100644
--- a/lambdatest_test.py
+++ b/lambdatest_test.py
@@ -2,6 +2,9 @@
 import unittest
 import sys
 from selenium import webdriver
+from selenium.webdriver.chrome.options import Options as ChromeOptions
+from selenium.webdriver.edge.options import Options as EdgeOptions
+from selenium.webdriver.common.by import By
 
 username = os.environ.get("LT_USERNAME")
 access_key = os.environ.get("LT_ACCESS_KEY")
@@ -11,21 +14,21 @@ class FirstSampleTest(unittest.TestCase):
 
     # setUp runs before each test case
     def setUp(self):
-        desired_caps = {
-            'LT:Options': {
-                "user": username,
-                "accessKey": access_key,
-                "build": "UnitTest-Selenium-Sample",
-                "name": "UnitTest-Selenium-Test",
-                "platformName": "Windows 11",
-                "selenium_version": "4.0.0",
-                #Enable Smart UI Project
-                # "smartUI.project": "<Project Name>",
-            },
-            "browserName": "Chrome",
-            "browserVersion": "latest",
+        lt_options = {
+            "user": username,
+            "accessKey": access_key,
+            "build": "UnitTest-Selenium-Sample",
+            "name": "UnitTest-Selenium-Test",
+            "platformName": "MacOS Ventura",
+            "w3c": True,
+            "browserName": "Edge",
+            "browserVersion": "latest-2",
+            "selenium_version": "4.8.0"
         }
-
+        
+        browser_options = EdgeOptions()
+        browser_options.set_capability('LT:Options', lt_options)
+  
         # Steps to run Smart UI project (https://beta-smartui.lambdatest.com/)
         # Step - 1 : Change the hub URL to @beta-smartui-hub.lambdatest.com/wd/hub
         # Step - 2 : Add "smartUI.project": "<Project Name>" as a capability above
@@ -34,7 +37,7 @@ def setUp(self):
 
         self.driver = webdriver.Remote(
             command_executor="http://hub.lambdatest.com:80/wd/hub",
-            desired_capabilities=desired_caps)
+            options=browser_options)
 
 
 # tearDown runs after each test case
@@ -50,26 +53,26 @@ def test_unit_user_should_able_to_add_item(self):
         driver.get("https://lambdatest.github.io/sample-todo-app/")
 
         # Click on check box
-        check_box_one = driver.find_element_by_name("li1")
+        check_box_one = driver.find_element(By.NAME,"li1")
         check_box_one.click()
 
         # Click on check box
-        check_box_two = driver.find_element_by_name("li2")
+        check_box_two = driver.find_element(By.NAME,"li2")
         check_box_two.click()
 
         #Take Smart UI screenshot
         #driver.execute_script("smartui.takeScreenshot")
 
         # Enter item in textfield
-        textfield = driver.find_element_by_id("sampletodotext")
+        textfield = driver.find_element(By.ID,"sampletodotext")
         textfield.send_keys("Yey, Let's add it to list")
 
         # Click on add button
-        add_button = driver.find_element_by_id("addbutton")
+        add_button = driver.find_element(By.ID,"addbutton")
         add_button.click()
 
         # Verified added item
-        added_item = driver.find_element_by_xpath(
+        added_item = driver.find_element(By.XPATH,
             "//span[@class='done-false']").text
         print(added_item)
 
