Skip to content

Commit

Permalink
changes after review part - 4
Browse files Browse the repository at this point in the history
  • Loading branch information
pszkamruk-splunk committed Nov 29, 2023
1 parent dce9798 commit af1338a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ui_tests/pages/groups_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def click_submit_button_for_add_group(self):
)
add_grp_btn = driver.find_element(By.XPATH, add_group_button_xpath)
add_grp_btn.click()
time.sleep(5) # wait for group to be shown on the list
# wait for group to be shown on the list
time.sleep(5)

def click_submit_button_for_add_device(self):
self.click_submit_button_for_add_group()
Expand Down
9 changes: 8 additions & 1 deletion ui_tests/pages/header_page.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import re
import time
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

from logger.logger import Logger
from selenium.webdriver.common.by import By
Expand Down Expand Up @@ -29,7 +31,12 @@ def _switch_to_page(self, page_name):
xpath_button = page_button_xpath[page_name]
tab = driver.find_element(By.XPATH, xpath_button)
tab.click()
time.sleep(3)
page_table_xpath = {
"profiles": "//div[@data-test='sc4snmp:profiles-table']",
"groups": "//div[@data-test='sc4snmp:group-table']",
"inventory": "//div[@data-test='sc4snmp:inventory-table']"
}
WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, page_table_xpath[page_name])))

def apply_changes(self):
logger.info("Apply changes")
Expand Down

0 comments on commit af1338a

Please sign in to comment.