Skip to content

Smart UI Sample added #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lambdatest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down