예제 #1
0
from selenium import webdriver

from pages.training_ground_page import TrainingGroundPage
from pages.trial_page import TrialPage

# Test Setup
browser = webdriver.Chrome()

# Trial Page
trial_page = TrialPage(driver=browser)
trial_page.go()
trial_page.stone_input.input_text("rock")
trial_page.stone_button.click()

input()

# Training Page
trng_page = TrainingGroundPage(driver=browser)
trng_page.go()
assert trng_page.button1.text == 'Button1', 'Unexpected button1 text'

input()
browser.quit()
def test_trial_page(chrome_browser):
    trial_page = TrialPage(driver=chrome_browser)
    trial_page.go()
    trial_page.stone_input.input_text("rock")
    trial_page.stone_button.click()
    print("1-st test done")
예제 #3
0
 def test_something(self):
     browser = webdriver.Chrome()
     trial_page = TrialPage(driver=browser)
     trial_page.go()
     trial_page.stone_input.input_text('rock')
     trial_page.stone_button.click()
예제 #4
0
from selenium import webdriver
from pages.trial_page import TrialPage

# Test setup
browser = webdriver.Chrome()
stone_answer = 'rock'

# open Trial page
trng_page = TrialPage(driver=browser)
trng_page.go()

# Positive Test
trng_page.stone_input.input_text(stone_answer)
trng_page.stone_button.click()
stone_result = trng_page.stone_result.text
trng_page.secrets_input.input_text(stone_result)
trng_page.secrets_button.click()
name_result = trng_page.name_result.text
trng_page.name_input.input_text(name_result)
trng_page.name_answer_button.click()
trng_page.check_answer_button.click()
assert trng_page.result_banner.text == 'Trial Complete'
print('Test passed')
browser.quit()