websautotest 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1 +1,2 @@
1
- 0.1.0 inital move all the pagepattern to one module and start using autoload in the websautotest.rb
1
+ 0.1.0 inital move all the pagepattern to one module and start using autoload in the websautotest.rb
2
+ 0.1.1 add dashboard_page and shopcart_page
data/README CHANGED
@@ -3,7 +3,20 @@
3
3
  all webs automation page object written in ruby goes here
4
4
 
5
5
  page list:
6
- Co-reg_page.rb
7
- Portal_page.rb
8
- Signup_page.rb
9
- Sitebuilder_page.rb
6
+ lib/module/commonmethod.rb
7
+ lib/pagepattern/co-reg_page.rb
8
+ lib/pagepattern/dashboard_page.rb
9
+ lib/pagepattern/portal_page.rb
10
+ lib/pagepattern/shopcart_page.rb
11
+ lib/pagepattern/signup_page.rb
12
+ lib/pagepattern/sitebuilder_page.rb
13
+ lib/websautotest.rb
14
+
15
+ it has been published to the https://rubygems.org/ already
16
+ you should be able to install through
17
+ gem install websautotest
18
+
19
+
20
+ to push new update
21
+ gem build websautotest.gemspec
22
+ gem push websautotest
@@ -3,5 +3,13 @@ module Websautotest
3
3
  def initialize(session)
4
4
  @session = session
5
5
  end
6
+
7
+ def current_url
8
+ @session.current_url
9
+ end
10
+
11
+ def visit_redirect(url)
12
+ @session.visit url
13
+ end
6
14
  end
7
15
  end
@@ -1,5 +1,3 @@
1
- #require 'module/commonmethod'
2
- #require 'sitebuilder_page'
3
1
 
4
2
  module Websautotest
5
3
  module Pagepattern
@@ -0,0 +1,20 @@
1
+ module Websautotest
2
+ module Pagepattern
3
+ class Dashboard
4
+ include Websautotest::CommonPageOperation
5
+ def assertwebsover(iframename)
6
+ @session.should have_xpath("//div[@id='websover_header']/span[@id='websover_title']")
7
+ @session.find("//div[@id='websover_header']/span[@id='websover_title']").text.should eql(iframename)
8
+ end
9
+
10
+ def selectsite_dropdown(sitename)
11
+ @session.within_frame('websover_iframe') do
12
+ @session.find("//div[@id='select_container']").select sitename , :from =>'userID'
13
+ @session.find("//input[@id='submitButton']").click
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ end
20
+ end
@@ -1,7 +1,3 @@
1
- #require 'module/commonmethod'
2
-
3
- #require 'signup_page'
4
-
5
1
  module Websautotest
6
2
  module Pagepattern
7
3
  class Portal
@@ -52,6 +48,24 @@ module Websautotest
52
48
  end
53
49
 
54
50
  end
51
+
52
+ def click_signinpopup
53
+ @session.find("//a[@id='sign_in_nav']/span").click
54
+ end
55
+
56
+ def fill_logincred(user,password)
57
+ @session.within("//div[contains(@class,'clearfix sign_in_fields')]") do
58
+ @session.fill_in "FWloginUsername", :with => user
59
+ @session.evaluate_script("document.getElementById('FWloginPassword').focus()")
60
+ @session.fill_in "FWloginPassword2", :with=> password
61
+ end
62
+ end
63
+
64
+ def clicksignin_goto_dashboard
65
+ @session.find("//form[@id='login_leaf']/div[@class='clearfix sign_in_fields']/descendant::input[@id='sign_in_leaf']").click
66
+ @Dashboard=Dashboard.new(@session)
67
+ end
68
+
55
69
  end
56
70
 
57
71
  end
@@ -0,0 +1,9 @@
1
+ module Websautotest
2
+ module Pagepattern
3
+ class Shopcart
4
+ include Websautotest::CommonPageOperation
5
+
6
+ end
7
+
8
+ end
9
+ end
@@ -1,7 +1,3 @@
1
- #require 'module/commonmethod.rb'
2
- #require 'co-reg_page.rb'
3
- #require 'portal_page.rb'
4
-
5
1
  module Websautotest
6
2
  module Pagepattern
7
3
  class Signup < Portal
@@ -1,5 +1,3 @@
1
- #require 'module/commonmethod'
2
-
3
1
  module Websautotest
4
2
  module Pagepattern
5
3
  class Sitebuilder
data/lib/websautotest.rb CHANGED
@@ -8,5 +8,7 @@ module Websautotest
8
8
  autoload :Signup, 'pagepattern/signup_page'
9
9
  autoload :Coreg, 'pagepattern/co-reg_page'
10
10
  autoload :Sitebuilder, 'pagepattern/sitebuilder_page'
11
+ autoload :Dashboard, 'pagepattern/dashboard_page'
12
+ autoload :Shopcart, 'pagepattern/shopcart_page'
11
13
  end
12
14
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websautotest
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryo HANG
@@ -32,7 +32,9 @@ files:
32
32
  - lib/websautotest.rb
33
33
  - lib/module/commonmethod.rb
34
34
  - lib/pagepattern/co-reg_page.rb
35
+ - lib/pagepattern/dashboard_page.rb
35
36
  - lib/pagepattern/portal_page.rb
37
+ - lib/pagepattern/shopcart_page.rb
36
38
  - lib/pagepattern/signup_page.rb
37
39
  - lib/pagepattern/sitebuilder_page.rb
38
40
  homepage: http://www.webs.com/