def test_shadow(self):
     self.driver.get(TestShadowFeatures.get_page_location("index.html"))
     shadow = Shadow(self.driver)
     shadow.set_explicit_wait(10, 2)
     ele = shadow.find_element("div#container>h2#inside")
     assert ele is not None
     assert ele.text == "Inside Shadow DOM"
 def test_normal_web_element(self):
     self.driver.get(TestShadowFeatures.get_page_location("index.html"))
     shadow = Shadow(self.driver)
     shadow.set_explicit_wait(10, 2)
     ele = shadow.find_element("h3")
     assert ele is not None
     assert ele.text == "some DOM element"
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.maximize_window()
driver.get("http://*****:*****@qafrevvo")
driver.find_element_by_id("password").send_keys("qafrevvo")
driver.find_element_by_id("login-button").click()
#time.sleep(2)
#driver.find_element_by_xpath("//button[@class='_hj-2qaGY__styles__openStateToggle']").click()

driver.find_element_by_xpath("//a[@title='Add new content']").click()
driver.find_element_by_xpath(
    "//a/paper-icon-item/iron-icon[@icon='frevvo-ui-icons:create-new-folder']"
).click()

time.sleep(1)
shadow = Shadow(driver)
shadow.find_element(
    "frevvo-ui-wizard-dialog>frevvo-ui-project-wizard>paper-input-container#container>iron-input.input-element>input"
).send_keys("Prj123")
time.sleep(1)
shadow.find_element(
    "frevvo-ui-wizard-dialog#project-wizard>paper-dialog#wizardDialog>div#wizardButtons>paper-button#finishButton"
).click()

time.sleep(1)
driver.find_element_by_xpath("//a[@title='Add new content']").click()
driver.find_element_by_xpath(
    "//a/paper-icon-item/iron-icon[@icon='frevvo-ui-icons:workflow-2']").click(
    )

time.sleep(1)
Example #4
0
     '//*[@id="btnToolbar"]/span/micro-ui/scopus-search-results-download/els-button'
 ).click()
 start_button = driver.find_element_by_id("btnDDMDownloadStart")
 while start_button.get_attribute('disabled') != "true":
     try:
         start_button.click()
     except:
         pass
 main_window_handle = driver.current_window_handle
 driver.execute_script('window.open()')
 all_window_handles = driver.window_handles
 for window_handle in all_window_handles:
     if window_handle != main_window_handle:
         driver.switch_to.window(window_handle)
         driver.get("chrome://settings/content/pdfDocuments")
         shadow = Shadow(driver)
         shadow.find_element("#radioCollapse").click()
 driver.close()
 driver.switch_to.window(main_window_handle)
 while True:
     if driver.find_element_by_xpath(
             '//*[@id="btnDDMDownloadComplete"]/span').text == "Done":
         publisher_sites = driver.find_elements_by_xpath(
             '//*[@id="ddmVAPStatus"]/a')
         publisher_sites = publisher_sites[:-1]
         for i in range(len(publisher_sites)):
             publisher_sites[i] = publisher_sites[i].get_attribute("href")
         driver.implicitly_wait(1)
         for publisher_site in publisher_sites:
             driver.execute_script('window.open("' + publisher_site + '")')
         all_window_handles = driver.window_handles
 def test_shadow_object_not_none(self):
     shadow = Shadow(self.driver)
     assert shadow is not None
    def test_02CreateWFAddToNewProject(self):
        self.driver.find_element_by_xpath(
            "//a[@title='Add new content']").click()
        self.driver.find_element_by_xpath(
            "//a/paper-icon-item/iron-icon[@icon='frevvo-ui-icons:workflow-2']"
        ).click()

        shadow = Shadow(self.driver)
        time.sleep(2)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>frevvo-ui-project-action-screen#project-action-screen>div#projectTypeScreen>paper-button.select-button.button"
        ).click()
        time.sleep(2)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-input-container#container>iron-input.input-element>input"
        ).send_keys("Prj1234")
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>paper-button#nextButton"
        ).click()
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-input-container#container>iron-input.input-element>input"
        ).send_keys("Workflow123")
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>paper-button#nextButton"
        ).click()
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-icon-button#add-steps-icon"
        ).click()
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>paper-button#finishButton"
        ).click()
        time.sleep(1)
        self.driver.find_element_by_xpath(
            "//div/a[@title='Go to home page']").click()  #Click on FREVVO logo
    def test_01CreateProjectWithWF(self):
        time.sleep(2)
        #self.driver.find_element_by_xpath("//button[@class='_hj-2qaGY__styles__openStateToggle']").click()

        self.driver.find_element_by_xpath(
            "//a[@title='Add new content']").click()
        self.driver.find_element_by_xpath(
            "//a/paper-icon-item/iron-icon[@icon='frevvo-ui-icons:create-new-folder']"
        ).click()

        time.sleep(1)
        shadow = Shadow(self.driver)
        shadow.find_element(
            "frevvo-ui-wizard-dialog>frevvo-ui-project-wizard>paper-input-container#container>iron-input.input-element>input"
        ).send_keys("Prj123")
        time.sleep(2)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#project-wizard>paper-dialog#wizardDialog>div#wizardButtons>paper-button#finishButton"
        ).click()

        time.sleep(1)
        self.driver.find_element_by_xpath(
            "//a[@title='Add new content']").click()
        self.driver.find_element_by_xpath(
            "//a/paper-icon-item/iron-icon[@icon='frevvo-ui-icons:workflow-2']"
        ).click()

        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-input-container#container>iron-input.input-element>input"
        ).send_keys("Workflow123")
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>paper-dialog#wizardDialog>div#wizardButtons>paper-button#nextButton"
        ).click()

        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-icon-button#add-steps-icon"
        ).click()
        time.sleep(1)
        shadow.find_element(
            "frevvo-ui-wizard-dialog#workflow-wizard>paper-dialog#wizardDialog>div#wizardButtons>paper-button#finishButton"
        ).click()
        time.sleep(1)
        self.driver.find_element_by_xpath("//div/a[@title='Go to home page']"
                                          ).click()  # Click on FREVVO logo
Example #8
0
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())
driver.maximize_window()
driver.get("http://*****:*****@qafrevvo")
driver.find_element_by_id("password").send_keys("qafrevvo")
driver.find_element_by_id("login-button").click()

driver.find_element_by_xpath("//a[@title='Add new content']").click()
driver.find_element_by_xpath(
    "//a/paper-icon-item/iron-icon[@icon='frevvo-ui-icons:workflow-2']").click(
    )

shadow = Shadow(driver)
time.sleep(2)
shadow.find_element(
    "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>frevvo-ui-project-action-screen#project-action-screen>div#projectTypeScreen>paper-button.select-button.button"
).click()
time.sleep(2)
shadow.find_element(
    "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-input-container#container>iron-input.input-element>input"
).send_keys("Prj1234")
time.sleep(1)
shadow.find_element(
    "frevvo-ui-wizard-dialog#workflow-wizard>paper-button#nextButton").click()
time.sleep(1)
shadow.find_element(
    "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-input-container#container>iron-input.input-element>input"
).send_keys("Workflow123")
Example #9
0
File: qa.py Project: sukgu/pyshadow
import time
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
from pyshadow.main import Shadow

driver.get("http://staging-app.frevvo.com/")
driver.maximize_window()
shadow = Shadow(driver)
title = driver.title
print(title)
driver.find_element_by_name("username").send_keys("")
driver.find_element_by_name("password").send_keys("")
driver.find_element_by_id("login-button").click()
time.sleep(6)
driver.find_element_by_xpath(
    "//div[@class='_hj-widget-container _hj-widget-theme-dark']/div/div/button/span"
).click()
driver.find_element_by_xpath("//div[@id='center-content']/ul/a[4]").click()
driver.find_element_by_xpath(
    "//*[@id='project-new-menu']/div/paper-listbox/a[2]/paper-icon-item"
).click()
shadow.set_implicit_wait(3)
time.sleep(3)
shadow.find_element(
    "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>frevvo-ui-project-action-screen#project-action-screen>div#projectTypeScreen>paper-button.select-button.button"
).click()
shadow.set_implicit_wait(1)
time.sleep(3)
shadow.find_element(
    "frevvo-ui-wizard-dialog#workflow-wizard>frevvo-ui-workflow-wizard>paper-input-container#container>iron-input.input-element>input"