File tree 3 files changed +26
-0
lines changed
3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
5
5
### Enhancements
6
6
7
7
### Bug fixes
8
+ - Fix including search context in ` ::Selenium::WebDriver::Elemenet `
9
+ - ` include ::Appium::Core::Base::SearchContext ` instead of ` ::Selenium::WebDriver::SearchContext `
8
10
9
11
### Deprecations
10
12
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ module Core
4
4
# Implement useful features for element.
5
5
# Patch for Selenium Webdriver.
6
6
class Selenium ::WebDriver ::Element
7
+ # To extend Appium related SearchContext into ::Selenium::WebDriver::Element
8
+ include ::Appium ::Core ::Base ::SearchContext
9
+
7
10
# Note: For testing .text should be used over value, and name.
8
11
9
12
# Returns the value attribute
Original file line number Diff line number Diff line change @@ -80,5 +80,26 @@ def test_default_timeout_for_http_client
80
80
assert_equal 999_999 , @core . http_client . open_timeout
81
81
assert_equal 999_999 , @core . http_client . read_timeout
82
82
end
83
+
84
+ def test_search_context_in_element_class
85
+ expected = {
86
+ class : 'class name' ,
87
+ class_name : 'class name' ,
88
+ css : 'css selector' ,
89
+ id : 'id' ,
90
+ link : 'link text' ,
91
+ link_text : 'link text' ,
92
+ name : 'name' ,
93
+ partial_link_text : 'partial link text' ,
94
+ tag_name : 'tag name' ,
95
+ xpath : 'xpath' ,
96
+ accessibility_id : 'accessibility id' ,
97
+ uiautomation : '-ios uiautomation' ,
98
+ predicate : '-ios predicate string' ,
99
+ class_chain : '-ios class chain' ,
100
+ uiautomator : '-android uiautomator'
101
+ }
102
+ assert_equal expected , ::Selenium ::WebDriver ::Element ::FINDERS
103
+ end
83
104
end
84
105
end
You can’t perform that action at this time.
0 commit comments