Class: Websautotest::Pagepattern::Signup
Instance Method Summary
collapse
#current_url, #initialize, #visit_redirect
Methods inherited from Portal
#click_signinpopup, #clicksignin_goto_dashboard, #clicksignin_goto_sitemanager, #clickstarted_goto_signup, #emailsignup, #fill_email, #fill_logincred, #fill_password, #lookfor_signuppage, #noinfosignup, #select_webstype
Instance Method Details
#assert_categorytype(type) ⇒ Object
51
52
53
|
# File 'lib/pagepattern/signup_page.rb', line 51
def assert_categorytype(type)
@session.find("//div[@id='site_categories_container']/label[@class='for_category selected']").text.should include(type)
end
|
#assertnewpage(times, step1text) ⇒ Object
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/pagepattern/signup_page.rb', line 5
def assertnewpage(times,step1text)
$i=0
while $i<times.to_i do
if @session.find("//div[contains(@id,'step1')]/descendant::*/span[@class='signup_bulletitle']").text == (step1text) then
break
end
noinfosignup(10)
clickstarted_goto_signup
end
end
|
#assertnewsignup_fromemailsignup(times, step1text, email, username, type) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/pagepattern/signup_page.rb', line 16
def assertnewsignup_fromemailsignup(times,step1text,email,username,type)
$i=0
while $i<times.to_i do
if @session.find("//div[contains(@id,'step1')]/descendant::*/span[@class='signup_bulletitle']").text == (step1text) then
break
end
emailsignup(10)
fill_email(email)
fill_password(username)
select_webstype(type)
clickstarted_goto_signup
end
end
|
#assertthreestep(step1text, step2text, step3text) ⇒ Object
32
33
34
35
36
|
# File 'lib/pagepattern/signup_page.rb', line 32
def assertthreestep(step1text,step2text,step3text)
@session.find("//div[contains(@id,'step1')]/descendant::*/span[@class='signup_bulletitle']").text.should eql(step1text)
@session.find("//div[@id='standardAccountFieldsWrapper3']/descendant::*/span[@class='signup_bulletitle']").text.should eql(step2text)
@session.find("//div[@id='choose-pages']/descendant::*/span[@class='signup_bulletitle']").text.should eql(step3text)
end
|
#clickregister_goto_coreg ⇒ Object
67
68
69
70
|
# File 'lib/pagepattern/signup_page.rb', line 67
def clickregister_goto_coreg()
@session.find("//input[@id='register']").click
@Coreg=Coreg.new(@session)
end
|
#fill_signupemail(email) ⇒ Object
38
39
40
|
# File 'lib/pagepattern/signup_page.rb', line 38
def fill_signupemail(email)
@session.fill_in "emailAddress", :with =>email
end
|
#fill_signuppassword(password) ⇒ Object
42
43
44
|
# File 'lib/pagepattern/signup_page.rb', line 42
def fill_signuppassword(password)
@session.fill_in "password", :with => password
end
|
#fill_SiteAddressAndTitle(sitename) ⇒ Object
46
47
48
49
|
# File 'lib/pagepattern/signup_page.rb', line 46
def fill_SiteAddressAndTitle(sitename)
@session.fill_in "siteAddress", :with => sitename
@session.fill_in "siteTitle", :with => sitename
end
|
#loopfor_newsignup ⇒ Object
72
73
74
|
# File 'lib/pagepattern/signup_page.rb', line 72
def loopfor_newsignup
end
|
#select_pages ⇒ Object
59
60
61
62
63
64
65
|
# File 'lib/pagepattern/signup_page.rb', line 59
def select_pages()
@session.find("//div[contains(@id,'recommended_pages')]/child::*/li[2]").check("chosenTemplateIds")
@session.find("//div[contains(@id,'recommended_pages')]/child::*/li[4]").check("chosenTemplateIds")
@session.find("//div[contains(@id,'recommended_pages')]/child::*/li[4]").check("chosenTemplateIds")
@session.find("//div[contains(@id,'recommended_pages')]/child::*/li[4]").check("chosenTemplateIds")
@session.find("//div[contains(@id,'recommended_pages')]/child::*/li[5]").check("chosenTemplateIds")
end
|
#select_template ⇒ Object
55
56
57
|
# File 'lib/pagepattern/signup_page.rb', line 55
def select_template()
@session.find("//li[1]/div/a").click
end
|