require 'rspec' require 'selenium-webdriver' require_relative '../page_objects/login_page' require_relative '../page_objects/abstract_page' describe 'Testing sign_yourself' do wait = Selenium::WebDriver::Wait.new(timeout: 60) app = nil before(:each) do app = AbstractPage.new(Selenium::WebDriver.for :chrome) end after(:each) do app.quit end it 'will go through SignYourself and this should be successful' do app .navigateToLoginPage #Cause Navigation .fillInEmail("eric.cheng@kdanmobile.com") .clickBtnAfterFillingEmail .fillInPassword("ratherwoman5796",wait) .clickBtnAfterFillingPassword #Cause Navigation .clickPurpleCircle(wait) .clickSignYourself(wait) #Cause Navigation .uploadPdfFile(wait) .clickNextStep #Cause Navigation .assignName(wait) .assignTime(wait) .assignText(wait) .assignCheckbox(wait) .assignRadioBtn(wait) .clickNextStep .comfirmCreateDocument(wait) #Cause Navigation .backMainPage(wait) #Cause Navigation .clickCompletedPage(wait) .clickNewestDocument(wait) #Cause Navigation .takeScreenshotAndNotify("Task 1: Sign Yourself","SUCCESS") end # it "will go through GetSignature and it will be successful" do # app # .navigateToLoginPage #Cause Navigation # .fillInEmail("eric.cheng@kdanmobile.com") # .clickBtnAfterFillingEmail # .fillInPassword("ratherwoman5796",wait) # .clickBtnAfterFillingPassword #Cause Navigation # .clickPurpleCircle(wait) # .clickGetSignature(wait) #Cause Navigation #Here's the difference. # .uploadPdfFile(wait) # .clickNextStep #Cause Navigation # end end