Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
object_repository/mobile/mobile_google_search.rb | 57 | 26 | 75.44%
|
46.15%
|
Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.
2 =begin |
3 *Name : Google Search |
4 *Description : class that holds the Google page objects and method definitions |
5 *Author : Chandra sekaran |
6 *Creation Date : 24/04/2015 |
7 *Modification Date: |
8 =end |
9 |
10 module CUKES |
11 class MobileGoogle_HomePage |
12 include PageObject |
13 include PageUtils |
14 |
15 text_field(:textfield_search, :name => "q") |
16 button(:button_search, :name => "btnG") |
17 div(:div_result, :id => "main") |
18 link(:link_rubygems, :href => "https://rubygems.org/") |
19 |
20 expected_title /Google|RubyGems.org/ |
21 |
22 # Description : invoked when the page class object is created |
23 # Author : Chandra sekaran |
24 # |
25 def initialize_page |
26 wait_for_page_load |
27 has_expected_title? |
28 end |
29 |
30 # Description : searches for the given input string |
31 # Author : Chandra sekaran |
32 # Argument : |
33 # str_search_text : search text |
34 # |
35 def search_for_text(str_search_text) |
36 wait_for_object(textfield_search_element, "Could not find 'search textbox'") |
37 self.textfield_search = str_search_text |
38 wait_for_object(textfield_search_element, "Could not find 'search button'") |
39 click_on(button_search_element) |
40 $log.success("Search completed successfully for string '#{str_search_text}'") |
41 rescue Exception => ex |
42 $log.error("Failure while searching for string '#{str_search_text}' : #{ex}") |
43 exit |
44 end |
45 |
46 # Description : clicks the Bet365.com link from the search result |
47 # Author : Chandra sekaran |
48 # |
49 def click_rubygems |
50 wait_for_object(link_rubygems_element, "Could not find 'rubygems.org' link on mobile") |
51 click_on(link_rubygems_element) |
52 $log.success("rubygems link clicked successfully") |
53 rescue Exception => ex |
54 $log.error("Failure in clicking the link for rubygems.org : #{ex}") |
55 exit |
56 end |
57 end |
58 end |
Generated on 2015-05-08 10:40:30 +0530 with SimpleCov-RCov 0.2.3