def test_download(self):
     launch_browser = selenium_webdriver.driver
     time.sleep(10)
     Element.fetch_element_by_xpath(
         launch_browser, ElementFeatureValue.ctrl_scanning_xpath).click()
     time.sleep(5)
     Element.fetch_element_by_partial_linktext(
         launch_browser, ElementFeatureValue.ctrl_download_tag).click()
Exemple #2
0
 def test_add_most_critical_advisories(self):
     launch_driver = selenium_webdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(launch_driver, AddDashboard.ctrl_most_critical_advisories).click()
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element critical advisories not found")
Exemple #3
0
 def test_add_latest_advisories_per_watch_list(self):
     launch_driver = selenium_webdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(launch_driver, AddDashboard.ctrl_latest_advisories_per_watchList).click()
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element latest advisories per watch not found")
Exemple #4
0
 def test_add_latest_advisories_affecting_your_security(self):
     launch_driver = selenium_webdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(launch_driver, AddDashboard.ctrl_latest_advisories_affecting_your_security).click()
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element latest advisories affecting your security not found")
Exemple #5
0
 def test_add_devices_status_time(self):
     launch_driver = selenium_webdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(launch_driver, AddDashboard.ctrl_devices_status_time).click()
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element device status time not found")
Exemple #6
0
 def test_add_your_latest_assigned_tickets(self):
     launch_driver = selenium_webdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(launch_driver, AddDashboard.ctrl_your_latest_assigned_tickets).click()
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element not found")
Exemple #7
0
 def test_add_most_prevalent_insecure_software_installtions(self):
     launch_driver = selenium_webdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(launch_driver, AddDashboard.ctrl_most_prevalent_insecure_software_installtions).click()
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element not found")
Exemple #8
0
 def test_remove(self):
         launch_driver = selenium_webdriver.driver
         time.sleep(10)
         element1 = Element.fetch_elements_by_classname(launch_driver, Dashboard.ctrl_classname)
         print (len(element1))
         for x in range(0, len(element1)):
                 if element1[x].is_displayed():
                         element1[x].click()
         time.sleep(10)
         Element.fetch_element_by_xpath(launch_driver, Dashboard.ctrl_save_button).click()
Exemple #9
0
 def exportCSV(self):
     print("Inside export CSv")
     Element.fetch_element_by_xpath(
         self.launch_browser,
         "//table[@class='x-btn x-btn-noicon x-btn-menu-active']/tbody/tr[2]/td[2]/em/button]"
     ).click()
     Element.fetch_element_by_xpath(
         self.launch_browser,
         "//table[@class='x-menu x-menu-floating x-layer']/ul/li[1]/a/span]"
     ).click()
Exemple #10
0
 def test_add_advisories(self):
     launch_driver = SeleniumWebdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(
             launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_xpath(
             launch_driver, AddDashboard.ctrl_advisories).click()
         Element.fetch_element_by_xpath(launch_driver,
                                        Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element advisories not found")
Exemple #11
0
 def test_add_latest_available_patches(self):
     launch_driver = SeleniumWebdriver.driver
     time.sleep(10)
     try:
         Element.fetch_element_by_class(
             launch_driver, AddDashboard.ctrl_add_class).click()
         Element.fetch_element_by_partial_linktext(
             launch_driver,
             AddDashboard.ctrl_latest_available_patches).click()
         Element.fetch_element_by_xpath(launch_driver,
                                        Dashboard.ctrl_save_button).click()
     except NoSuchElementException:
         print("element latest available patches not found")
Exemple #12
0
    def createUser(
        self,
        username,
        usertype,
    ):
        time.sleep(5)
        Element.fetch_element_by_partial_linktext(self.launch_browser,
                                                  "Administration").click()
        print("Administration Clicked\n")

        time.sleep(5)

        Element.fetch_element_by_partial_linktext(self.launch_browser,
                                                  "User Management").click()
        time.sleep(3)
        #Element.fetch_element_by_xpath(self.launch_browser,"//button[@id='ext-gen302']").click()
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//table[@id='sfw.csiUserManagement_create_new_button']/tbody/tr[2]/td[2]/em/button"
        ).click()

        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_account_name']").send_keys(
                username)
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_account_username']").send_keys(
                username)
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_account_email']").send_keys(
                "*****@*****.**")
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_recipient_email']").send_keys(
                "*****@*****.**")
        if usertype == 'RWUser':
            Element.fetch_element_by_xpath(
                self.launch_browser,
                "//input[@id='sfw.csiUserManagement_roleCheckbox_scanning']"
            ).click()
            Element.fetch_element_by_xpath(
                self.launch_browser,
                "//input[@id='sfw.csiUserManagement_roleCheckbox_patching']"
            ).click()
            Element.fetch_element_by_xpath(
                self.launch_browser,
                "//input[@id='sfw.csiUserManagement_roleCheckbox_scanning_filter']"
            ).click()
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_roleCheckbox_results']").click(
            )
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_roleCheckbox_reporting']"
        ).click()
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//input[@id='sfw.csiUserManagement_roleCheckbox_db_access']"
        ).click()
        time.sleep(5)
        Element.fetch_element_by_xpath(
            self.launch_browser,
            "//table[@id='sfw.csiUserManagement_saveAccountButton']/tbody/tr[2]/td[2]/em/button"
        ).click()
        time.sleep(5)
        Element.fetch_element_by_xpath(self.launch_browser,
                                       "//button[@id='ext-gen98']").click()