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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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/12] 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  :
