Пример #1
0
def step_impl(context):
    browser.setup(context)
    context.driver.get("http://mys01.fit.vutbr.cz:8033/")
    # 2 | setWindowSize | 1050x721 |  |
    context.driver.set_window_size(1050, 721)
    # 3 | click | linkText=Cameras |  |
    context.driver.find_element(By.LINK_TEXT, "Cameras").click()
Пример #2
0
def step_impl(context):
    browser.setup(context)
    context.driver.get(
        "http://mys01.fit.vutbr.cz:8033/index.php?route=product/product&manufacturer_id=8&product_id=41"
    )
    context.old = context.driver.find_element(By.CSS_SELECTOR,
                                              "h2:nth-child(1)").text
    context.driver.set_window_size(1299, 741)
Пример #3
0
def step_impl(context):
    browser.setup(context)
    context.driver.get("http://mys01.fit.vutbr.cz:8033/")
    context.driver.set_window_size(1299, 741)
    context.driver.find_element(By.LINK_TEXT, "Cameras").click()
    context.driver.find_element(
        By.CSS_SELECTOR, ".product-layout:nth-child(2) .hidden-xs").click()
    context.driver.execute_script("window.scrollTo(0,482)")
    assert context.driver.find_element(By.LINK_TEXT, "Nikon D300")
Пример #4
0
def step_impl(context):
    browser.setup(context)
    # 1 | open | / |  |
    context.driver.get("http://mys01.fit.vutbr.cz:8033/")
    # 2 | setWindowSize | 1299x741 |  |
    context.driver.set_window_size(1299, 741)
    # 3 | click | linkText=MP3 Players |  |
    context.driver.find_element(By.LINK_TEXT, "MP3 Players").click()
    # 4 | click | linkText=Show All MP3 Players |  |
    context.driver.find_element(By.LINK_TEXT, "Show All MP3 Players").click()
    # 5 | mouseOver | css=.product-layout:nth-child(1) button:nth-child(2) |  |
    element = context.driver.find_element(
        By.CSS_SELECTOR, ".product-layout:nth-child(1) button:nth-child(2)")
    actions = ActionChains(context.driver)
    actions.move_to_element(element).perform()
    # 6 | mouseOut | css=.product-layout:nth-child(1) button:nth-child(2) |  |
    element = context.driver.find_element(By.CSS_SELECTOR, "body")
    actions = ActionChains(context.driver)
    actions.move_to_element(element).perform()
    # 7 | click | linkText=iPod Nano |  |
    context.driver.find_element(By.LINK_TEXT, "iPod Nano").click()
Пример #5
0
def step_impl(context):
    browser.setup(context)
    context.driver.get("http://mys01.fit.vutbr.cz:8033/")
    context.driver.set_window_size(1299, 741)