## Shipping Address ##
GenericLib.selectDropDownByVisibleText("id=addressCountryId","Canada")
GenericLib.inputText("id=shippingAddressForm.street1","Test")
GenericLib.inputText("id=shippingAddressForm.street2","Address")
GenericLib.inputText("id=shippingAddressForm.city","Edmonton")
GenericLib.selectDropDownByVisibleText("id=addressRegionId","Alberta")
GenericLib.inputText("id=shippingAddressForm.postalCode","T5A0A1")

## Coach Referral ##
sCoachId = GenericLib.getValueFromINIFile('Config.ini','Environment', 'ReferralCoachID')
GenericLib.clickObject("id=coachSelectedInput")
GenericLib.selectDropDownByValue("id=coachLookupType","search-coach-id")
GenericLib.inputText("id=coachSearchField",sCoachId)
GenericLib.clickObject("id=_TBBSIGNUP_WAR_signuprefactorportlet_lookupCoachBtn")
time.sleep(5)
print GenericLib.verifyObjectText("CSS=span[id='_TBBSIGNUP_WAR_signuprefactorportlet_coachSelectedMessage'] > span", "Yes, I want")


## T&C ##
GenericLib.selectCheckbox("id=termsAndConditionsForm.termsAndConditionsAgree1")

## CASL T&C ##
GenericLib.selectCheckbox("id=termsAndConditionsForm.canadaOptIn1")
sExpectedText = "I want to receive communication and support from my Team Beachbody Coach to learn about exciting specials and upcoming releases. There are no hidden fees or charges later on and I can choose to stop receiving communication at any time. For any questions, e-mail [email protected] or write to Attn: Legal Dept., 3301 Exposition Blvd., 3rd Fl., Santa Monica, CA 90404."
print  GenericLib.verifyObjectText("CSS=div[id='tncText']", sExpectedText)

## CAPTCHA and Submit ##
GenericLib.inputText("name=_TBBSIGNUP_WAR_signuprefactorportlet_captchaText","1111")
GenericLib.clickObject("id=free_submit")

sText = "This is Free flow where selecting the CASL T&C: - " + emailId
Exemplo n.º 2
0
sConfigFilePath = frameworkPath + "\\Config.ini"
print "SConfig File Path "
print sConfigFilePath
GenericLib.openBrowser("http://gmail.com")
time.sleep(5)
##print "slept for 10 sec"

## Not a member ##
GenericLib.inputText("id=Email", "*****@*****.**")
GenericLib.inputText("id=Passwd", "beachbody123")
GenericLib.clickObject("id=signIn")

##GenericLib.waitForElement("xpath=//input[@title='Sent Mail']", 100)

GenericLib.clickObject("xpath=//a[@title='Sent Mail']")
GenericLib.verifyObjectText("xpath=//a[@title='Sent Mail']", "Sent Mail")

GenericLib.closeBrowser()
#### Select Free registration link ##
##GenericLib.clickObject("CSS=img[alt='Sign me up for FREE membership']")
##
#### General Information ##
##GenericLib.inputText("id=loginForm.firstName", "Test")
##GenericLib.inputText("id=loginForm.lastName", "Test")
##screenName = "AT" + current_time
##emailId =  screenName + "@test.com"
##GenericLib.inputText("id=emailForm.email",emailId)
##GenericLib.inputText("id=emailForm.confirmEmail",emailId)
##password = "******"
##GenericLib.inputText("name=passwordScreennameForm.password",password)
##GenericLib.inputText("name=passwordScreennameForm.confirmPassword",password)