From 5be2cb1c255f78e3c94223ceed3a7da8a8ec2283 Mon Sep 17 00:00:00 2001 From: Itsme-Parth Date: Mon, 12 Sep 2022 21:35:46 +0530 Subject: [PATCH 1/2] Adding Smart UI sample --- lambdatest.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lambdatest.py b/lambdatest.py index 5a83261..266eb75 100644 --- a/lambdatest.py +++ b/lambdatest.py @@ -15,23 +15,30 @@ class FirstSampleTest(unittest.TestCase): def setUp(self): desired_caps = { 'LT:Options': { - "build": "Python Demo", # Change your build name here + "build": "Python Slack Test Demo", # Change your build name here "name": "Python Demo Test", # Change your test name here "platformName": "Windows 11", "selenium_version": "4.0.0", "console": 'true', # Enable or disable console logs - "network": 'true' # Enable or disable network logs + "network": 'true', # Enable or disable network logs + #Enable Smart UI Project + #"smartUI.project": "" }, "browserName": "firefox", "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": "" 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/wd/hub".format( username, access_key), desired_capabilities=desired_caps) - # tearDown runs after each test case @@ -57,6 +64,9 @@ def test_demo_site(self): location.click() print("Location is selected as Bali.") + #Take Smart UI screenshot + #driver.execute_script("smartui.takeScreenshot") + # Let's select the number of guests driver.find_element(By.ID, "headlessui-listbox-button-5").click() guests = driver.find_element(By.ID, "2") From 8cd4d5cbabbc717e15a90a61ef080d0d753172b3 Mon Sep 17 00:00:00 2001 From: Itsme-Parth Date: Mon, 12 Sep 2022 21:38:44 +0530 Subject: [PATCH 2/2] Change Build Name --- lambdatest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambdatest.py b/lambdatest.py index 266eb75..d3e4cd6 100644 --- a/lambdatest.py +++ b/lambdatest.py @@ -15,7 +15,7 @@ class FirstSampleTest(unittest.TestCase): def setUp(self): desired_caps = { 'LT:Options': { - "build": "Python Slack Test Demo", # Change your build name here + "build": "Python Demo", # Change your build name here "name": "Python Demo Test", # Change your test name here "platformName": "Windows 11", "selenium_version": "4.0.0",