From 31ca5d4ccdae36067f6d5292ac102117637c6508 Mon Sep 17 00:00:00 2001 From: Eric Turgeon <4249848+ericbsd@users.noreply.github.com> Date: Fri, 29 Dec 2023 10:30:27 -0400 Subject: [PATCH] TE-1318 / Update and improve the UI test for 13.1 (#9342) * Did some minor change to fix some UI test issues * Added code to close aws popover also changed the error message to work with both message seen with AWS * Change pytestmark to the google drive test to fix it Also to the iscsi test * added longer wait for test folder * change the sleep before click test folder to 1 second * sleep .5 before expending My Google Drive task * only test Google drive cloud sync test * Adding second sleep after folder is found for google drive test cases * See if selecting the folder before double clicking make a difference. * Ensure the 'Move to trash?' dialog is out of the way * Changed Google Drive xpaths that touch --- tests/bdd/core/test_NAS_T1003.py | 4 -- tests/bdd/core/test_NAS_T1004.py | 3 -- tests/bdd/core/test_NAS_T1006.py | 3 -- tests/bdd/core/test_NAS_T1007.py | 3 -- tests/bdd/core/test_NAS_T1010.py | 3 -- tests/bdd/core/test_NAS_T1024.py | 1 - tests/bdd/core/test_NAS_T1057.py | 2 +- tests/bdd/core/test_NAS_T1118.py | 2 +- tests/bdd/core/test_NAS_T1121.py | 2 + tests/bdd/core/test_NAS_T1135.py | 0 tests/bdd/core/test_NAS_T1136.py | 0 tests/bdd/core/test_NAS_T1140.py | 2 + tests/bdd/core/test_NAS_T1141.py | 73 ++++++++++++++++++++----------- tests/bdd/reusableSeleniumCode.py | 11 +++-- tests/bdd/xpaths.py | 6 +++ 15 files changed, 68 insertions(+), 47 deletions(-) delete mode 100644 tests/bdd/core/test_NAS_T1135.py delete mode 100644 tests/bdd/core/test_NAS_T1136.py diff --git a/tests/bdd/core/test_NAS_T1003.py b/tests/bdd/core/test_NAS_T1003.py index 93ca1e67c6f..940536a5cf9 100644 --- a/tests/bdd/core/test_NAS_T1003.py +++ b/tests/bdd/core/test_NAS_T1003.py @@ -19,10 +19,6 @@ parsers ) -import pytest - -pytestmark = [pytest.mark.debug_test] - @scenario('features/NAS-T1003.feature', 'Setup AD and verify it is working') def test_setup_acl_and_verify_it_is_working(driver): diff --git a/tests/bdd/core/test_NAS_T1004.py b/tests/bdd/core/test_NAS_T1004.py index 39048e6488a..a9716206bb9 100644 --- a/tests/bdd/core/test_NAS_T1004.py +++ b/tests/bdd/core/test_NAS_T1004.py @@ -19,9 +19,6 @@ when, parsers ) -import pytest - -pytestmark = [pytest.mark.debug_test] @scenario('features/NAS-T1004.feature', 'Create an Active Directory dataset on a system dataset') diff --git a/tests/bdd/core/test_NAS_T1006.py b/tests/bdd/core/test_NAS_T1006.py index 6e94d217d66..7c38bf261be 100644 --- a/tests/bdd/core/test_NAS_T1006.py +++ b/tests/bdd/core/test_NAS_T1006.py @@ -19,9 +19,6 @@ when, parsers ) -import pytest - -pytestmark = [pytest.mark.debug_test] @scenario('features/NAS-T1006.feature', 'Create an Active Directory dataset on the tank pool') diff --git a/tests/bdd/core/test_NAS_T1007.py b/tests/bdd/core/test_NAS_T1007.py index a915fe19517..4f71f6d8d21 100644 --- a/tests/bdd/core/test_NAS_T1007.py +++ b/tests/bdd/core/test_NAS_T1007.py @@ -19,9 +19,6 @@ when, parsers ) -import pytest - -pytestmark = [pytest.mark.debug_test] @scenario('features/NAS-T1007.feature', 'Create an smb share with the tank AD permission dataset') diff --git a/tests/bdd/core/test_NAS_T1010.py b/tests/bdd/core/test_NAS_T1010.py index 47b07dad941..054c4156f7c 100644 --- a/tests/bdd/core/test_NAS_T1010.py +++ b/tests/bdd/core/test_NAS_T1010.py @@ -20,9 +20,6 @@ when, parsers ) -import pytest - -pytestmark = [pytest.mark.debug_test] @scenario('features/NAS-T1010.feature', 'Create an smb share with the system AD permission dataset') diff --git a/tests/bdd/core/test_NAS_T1024.py b/tests/bdd/core/test_NAS_T1024.py index 78a3ebf849b..409860a6276 100644 --- a/tests/bdd/core/test_NAS_T1024.py +++ b/tests/bdd/core/test_NAS_T1024.py @@ -22,7 +22,6 @@ parsers ) - user = os.environ.get('USER') mount_point = f'/tmp/iscsi_{"".join(random.choices(string.digits, k=2))}' diff --git a/tests/bdd/core/test_NAS_T1057.py b/tests/bdd/core/test_NAS_T1057.py index f74676284ca..4be55ac9d3d 100644 --- a/tests/bdd/core/test_NAS_T1057.py +++ b/tests/bdd/core/test_NAS_T1057.py @@ -75,6 +75,6 @@ def verify_that_the_login_popup_appears(driver): assert wait_on_element(driver, 7, '//span[@aria-label="Jira"]') assert wait_on_element(driver, 5, '//input[@id="username"]') assert wait_on_element(driver, 5, '//button[@id="login-submit"]', 'clickable') - assert wait_on_element(driver, 5, '//button[contains(.,"Continue with Google")]', 'clickable') + assert wait_on_element(driver, 5, '//button[@id="google-auth-button"]', 'clickable') driver.close() driver.switch_to.window(driver.window_handles[0]) diff --git a/tests/bdd/core/test_NAS_T1118.py b/tests/bdd/core/test_NAS_T1118.py index 07995f7048e..6405187bdf3 100644 --- a/tests/bdd/core/test_NAS_T1118.py +++ b/tests/bdd/core/test_NAS_T1118.py @@ -135,7 +135,7 @@ def click_verify_credential_to_verify_the_key_id_is_invalid(driver): if wait_on_element(driver, 5, '//h1[contains(.,"Please wait")]'): assert wait_on_element_disappear(driver, 20, '//h1[contains(.,"Please wait")]') assert wait_on_element(driver, 10, '//h1[normalize-space(text())="Error"]') - assert wait_on_element(driver, 10, '//span[contains(.,"InvalidAccessKeyId:")]') + assert wait_on_element(driver, 10, '//span[contains(text(),"InvalidAccessKeyId:") or contains(text(),"NOTICE:")]') assert wait_on_element(driver, 5, '//button[@ix-auto="button__CLOSE"]', 'clickable') driver.find_element_by_xpath('//button[@ix-auto="button__CLOSE"]').click() diff --git a/tests/bdd/core/test_NAS_T1121.py b/tests/bdd/core/test_NAS_T1121.py index cb665980dbd..83313819249 100644 --- a/tests/bdd/core/test_NAS_T1121.py +++ b/tests/bdd/core/test_NAS_T1121.py @@ -196,6 +196,8 @@ def click_on_the_bucket_being_used_and_then_upload_a_file(driver): driver.find_element_by_xpath(f'//a[text()="{my_bucket}"]').click() assert wait_on_element(driver, 5, f'//h1[text()="{my_bucket}"]') assert wait_on_element(driver, 5, xpaths.aws.upload_Button, 'clickable') + rsc.click_If_Element_Exist(driver, xpaths.button.close_Popover) + s3_client = boto3.client('s3') s3_client.upload_file('cloud_test.txt', my_bucket, 'cloud_test.txt') driver.refresh() diff --git a/tests/bdd/core/test_NAS_T1135.py b/tests/bdd/core/test_NAS_T1135.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/bdd/core/test_NAS_T1136.py b/tests/bdd/core/test_NAS_T1136.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/bdd/core/test_NAS_T1140.py b/tests/bdd/core/test_NAS_T1140.py index ed9b8af4869..b2b55bf3d2b 100644 --- a/tests/bdd/core/test_NAS_T1140.py +++ b/tests/bdd/core/test_NAS_T1140.py @@ -16,6 +16,8 @@ when, parsers ) +import pytest +pytestmark = [pytest.mark.debug_test] @scenario('features/NAS-T1140.feature', 'Verify Google Drive credentials can be added') diff --git a/tests/bdd/core/test_NAS_T1141.py b/tests/bdd/core/test_NAS_T1141.py index 743a258950b..fa5478c0e12 100644 --- a/tests/bdd/core/test_NAS_T1141.py +++ b/tests/bdd/core/test_NAS_T1141.py @@ -20,6 +20,9 @@ parsers ) +import pytest +pytestmark = [pytest.mark.debug_test] + @scenario('features/NAS-T1141.feature', 'Verify Google Drive Cloud Sync task works') def test_verify_google_drive_cloud_sync_task_works(driver): @@ -274,10 +277,14 @@ def enter_the_user_name_click_Next_and_enter_the_password_click_Next(driver, use @then(parsers.parse('click on {folder1} then click on the test folder')) def click_on_folder1_then_click_on_the_test_folder(driver, folder1): """click on {folder1} then click on the test folder.""" + # Slow down the double click on the folder + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, f'//div[@data-tooltip="Google Drive Folder: {folder1}"]', 'clickable') + time.sleep(1) action = ActionChains(driver) action.double_click(driver.find_element_by_xpath(f'//div[@data-tooltip="Google Drive Folder: {folder1}"]')).perform() assert wait_on_element(driver, 7, f'//div[@data-tooltip="{folder1}" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 7, '//div[@data-tooltip="Google Drive Folder: initial"]', 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: test"]', 'clickable') time.sleep(1) @@ -289,13 +296,15 @@ def click_on_folder1_then_click_on_the_test_folder(driver, folder1): @then('verify all files are in the test folder') def verify_all_files_are_in_the_test_folder(driver): """verify all files are in the test folder.""" - assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]', 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Image: Gloomy_Forest_wallpaper_ForWallpapercom.jpg"]', 'clickable') - assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: music"]', 'clickable') + assert wait_on_element(driver, 5, xpaths.google_Drive.music_Folder, 'clickable') action = ActionChains(driver) - action.double_click(driver.find_element_by_xpath('//div[@data-tooltip="Google Drive Folder: music"]')).perform() + action.double_click(driver.find_element_by_xpath(xpaths.google_Drive.music_Folder)).perform() assert wait_on_element(driver, 5, '//div[@data-tooltip="music" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Audio: Mr_Smith_Pequeñas_Guitarras.mp3"]', 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]', 'clickable') driver.find_element_by_xpath('//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]').click() @@ -368,12 +377,13 @@ def verify_all_files_are_moved_from_the_google_drive_test_folder_to_the_dataset( driver.refresh() time.sleep(1) assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') - assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: music"]', 'clickable') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') + assert wait_on_element(driver, 5, xpaths.google_Drive.music_Folder, 'clickable') assert not is_element_present(driver, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]') assert not is_element_present(driver, '//div[@data-tooltip="Image: Gloomy_Forest_wallpaper_ForWallpapercom.jpg"]') - assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: music"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.music_Folder) action = ActionChains(driver) - action.double_click(driver.find_element_by_xpath('//div[@data-tooltip="Google Drive Folder: music"]')).perform() + action.double_click(driver.find_element_by_xpath(xpaths.google_Drive.music_Folder)).perform() assert wait_on_element(driver, 5, '//div[@data-tooltip="music" and @role="button"]') assert not is_element_present(driver, '//div[@data-tooltip="Audio: Mr_Smith_Pequeñas_Guitarras.mp3"]') assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]', 'clickable') @@ -426,12 +436,14 @@ def verify_all_files_are_moved_from_the_dataset_to_the_google_drive_test_folder( driver.refresh() time.sleep(1) assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]', 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Image: Gloomy_Forest_wallpaper_ForWallpapercom.jpg"]', 'clickable') - assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: music"]', 'clickable') + assert wait_on_element(driver, 5, xpaths.google_Drive.music_Folder, 'clickable') action = ActionChains(driver) - action.double_click(driver.find_element_by_xpath('//div[@data-tooltip="Google Drive Folder: music"]')).perform() + action.double_click(driver.find_element_by_xpath(xpaths.google_Drive.music_Folder)).perform() assert wait_on_element(driver, 5, '//div[@data-tooltip="music" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Audio: Mr_Smith_Pequeñas_Guitarras.mp3"]', 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]', 'clickable') driver.find_element_by_xpath('//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]').click() @@ -483,12 +495,13 @@ def verify_all_files_are_sync_to_the_dataset_folder(driver, nas_ip): def on_the_google_drive_test_folder_tab_delete_one_file(driver): """on the Google Drive test folder tab, delete one file.""" driver.switch_to.window(driver.window_handles[2]) - assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Image: Gloomy_Forest_wallpaper_ForWallpapercom.jpg"]') driver.find_element_by_xpath('//div[@data-tooltip="Image: Gloomy_Forest_wallpaper_ForWallpapercom.jpg"]').click() action = ActionChains(driver) action.send_keys(Keys.DELETE).perform() - assert wait_on_element(driver, 5, '//div[text()="Move to trash?"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.move_To_Trash) assert wait_on_element(driver, 5, '//button[*/text()="Move to trash"]', 'clickable') driver.find_element_by_xpath('//button[*/text()="Move to trash"]').click() assert wait_on_element_disappear(driver, 10, '//div[@data-tooltip="Image: Gloomy_Forest_wallpaper_ForWallpapercom.jpg"]') @@ -498,6 +511,7 @@ def on_the_google_drive_test_folder_tab_delete_one_file(driver): def on_the_nas_cloud_sync_task_tab_click_run_now(driver): """on the NAS cloud sync task tab, click Run Now.""" driver.switch_to.window(driver.window_handles[0]) + time.sleep(0.5) assert wait_on_element(driver, 7, '//div[contains(.,"Cloud Sync Tasks")]') assert wait_on_element(driver, 10, '//div[contains(text(),"My Google Drive task")]') assert wait_on_element(driver, 5, '//a[@ix-auto="expander__My Google Drive task"]', 'clickable') @@ -538,22 +552,25 @@ def verify_the_file_is_removed_from_the_dataset_folder(driver, nas_ip): def on_the_google_drive_test_folder_tab_delete_all_file(driver): """on the Google Drive test folder tab, delete all file.""" driver.switch_to.window(driver.window_handles[2]) - assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @role="button"]') - assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: music"]') - driver.find_element_by_xpath('//div[@data-tooltip="Google Drive Folder: music"]').click() + assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') + assert wait_on_element(driver, 5, xpaths.google_Drive.music_Folder, 'clickable') + driver.find_element_by_xpath(xpaths.google_Drive.music_Folder).click() action = ActionChains(driver) action.send_keys(Keys.DELETE).perform() - assert wait_on_element(driver, 5, '//div[text()="Move to trash?"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.move_To_Trash) assert wait_on_element(driver, 5, '//button[*/text()="Move to trash"]', 'clickable') driver.find_element_by_xpath('//button[*/text()="Move to trash"]').click() - assert wait_on_element_disappear(driver, 10, '//div[@data-tooltip="Google Drive Folder: music"]') - assert wait_on_element(driver, 5, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]') + assert wait_on_element_disappear(driver, 10, xpaths.google_Drive.move_To_Trash) + assert wait_on_element_disappear(driver, 10, xpaths.google_Drive.music_Folder) + assert wait_on_element(driver, 5, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]', 'clickable') driver.find_element_by_xpath('//div[@data-tooltip="PDF: Explaining_BSD.pdf"]').click() action = ActionChains(driver) action.send_keys(Keys.DELETE).perform() - assert wait_on_element(driver, 5, '//div[text()="Move to trash?"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.move_To_Trash) assert wait_on_element(driver, 5, '//button[*/text()="Move to trash"]', 'clickable') driver.find_element_by_xpath('//button[*/text()="Move to trash"]').click() + assert wait_on_element_disappear(driver, 10, xpaths.google_Drive.move_To_Trash) assert wait_on_element_disappear(driver, 10, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]') @@ -587,12 +604,17 @@ def verify_all_files_are_sync_to_the_google_drive_test_folder_tab(driver): time.sleep(1) driver.refresh() time.sleep(1) - assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]', 'clickable') - assert wait_on_element(driver, 5, '//div[@data-tooltip="Google Drive Folder: music"]', 'clickable') + assert wait_on_element(driver, 5, xpaths.google_Drive.music_Folder, 'clickable') + time.sleep(1) + # Select + driver.find_element_by_xpath(xpaths.google_Drive.music_Folder).click() action = ActionChains(driver) - action.double_click(driver.find_element_by_xpath('//div[@data-tooltip="Google Drive Folder: music"]')).perform() + action.double_click(driver.find_element_by_xpath(xpaths.google_Drive.music_Folder)).perform() assert wait_on_element(driver, 5, '//div[@data-tooltip="music" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="Audio: Mr_Smith_Pequeñas_Guitarras.mp3"]', 'clickable') assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]', 'clickable') driver.find_element_by_xpath('//div[@data-tooltip="test" and @data-tooltip-unhoverable="true" and @role="link"]').click() @@ -615,19 +637,20 @@ def verify_the_file_is_removed_from_the_google_drive_test_folder_tab(driver): while timeout > time.time(): driver.refresh() time.sleep(1) - assert wait_on_element(driver, 5, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 7, '//div[@data-tooltip="test" and @role="button"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.name_Sort, 'clickable') assert wait_on_element(driver, 7, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]', 'clickable') - if not is_element_present(driver, '//div[@data-tooltip="Google Drive Folder: music"]'): - assert not is_element_present(driver, '//div[@data-tooltip="Google Drive Folder: music"]') + if not is_element_present(driver, xpaths.google_Drive.music_Folder): + assert not is_element_present(driver, xpaths.google_Drive.music_Folder) break else: - assert not is_element_present(driver, '//div[@data-tooltip="Google Drive Folder: music"]') + assert not is_element_present(driver, xpaths.google_Drive.music_Folder) # clean the test folder on box tab before closing the tab. assert wait_on_element(driver, 5, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]', 'clickable') driver.find_element_by_xpath('//div[@data-tooltip="PDF: Explaining_BSD.pdf"]').click() action = ActionChains(driver) action.send_keys(Keys.DELETE).perform() - assert wait_on_element(driver, 5, '//div[text()="Move to trash?"]') + assert wait_on_element(driver, 5, xpaths.google_Drive.move_To_Trash) assert wait_on_element(driver, 5, '//button[*/text()="Move to trash"]', 'clickable') driver.find_element_by_xpath('//button[*/text()="Move to trash"]').click() assert wait_on_element_disappear(driver, 10, '//div[@data-tooltip="PDF: Explaining_BSD.pdf"]') diff --git a/tests/bdd/reusableSeleniumCode.py b/tests/bdd/reusableSeleniumCode.py index b168c6473e4..3c8c48ff70a 100644 --- a/tests/bdd/reusableSeleniumCode.py +++ b/tests/bdd/reusableSeleniumCode.py @@ -6,12 +6,12 @@ ) -def click_The_Summit_Button(driver): +def click_The_Summit_Button(driver: classmethod): assert wait_on_element(driver, 7, xpaths.button.summit, 'clickable') driver.find_element_by_xpath(xpaths.button.summit).click() -def wait_For_The_Tab_To_Close(driver): +def wait_For_The_Tab_To_Close(driver: classmethod): for num in range(10): if len(driver.window_handles) == 1: return True @@ -20,8 +20,13 @@ def wait_For_The_Tab_To_Close(driver): return False -def scroll_To(driver, xpath): +def scroll_To(driver: classmethod, xpath: str): assert wait_on_element(driver, 5, xpath) element = driver.find_element_by_xpath(xpath) driver.execute_script("arguments[0].scrollIntoView();", element) time.sleep(0.2) + + +def click_If_Element_Exist(driver: classmethod, xpath: str): + if wait_on_element(driver, 5, xpath, 'clickable'): + driver.find_element_by_xpath(xpath).click() diff --git a/tests/bdd/xpaths.py b/tests/bdd/xpaths.py index 591f03dba90..7409c9ce626 100644 --- a/tests/bdd/xpaths.py +++ b/tests/bdd/xpaths.py @@ -21,6 +21,7 @@ class button: leave_Domain = '//button[@ix-auto="button__LEAVE DOMAIN"]' i_Agree = '//button[@ix-auto="button__I AGREE"]' summit = '//button[@ix-auto="button__SUBMIT"]' + close_Popover = '//button[@title="Close popover"]' class checkbox: @@ -37,6 +38,11 @@ class domain_Credentials: title = '//h4[contains(.,"Domain Credentials")]' +class google_Drive: + name_Sort = '//div[contains(text(),"Name") and @role="button"]' + music_Folder = '//div[@data-tooltip="Google Drive Folder: music"]' + move_To_Trash = '//div[text()="Move to trash?"]' + class input: username = '//input[@ix-auto="input__Username"]' password = '//input[@ix-auto="input__Password"]'