@@ -1888,18 +1888,18 @@ trait WebBrowser {
1888
1888
*/
1889
1889
def clear (): Unit = { underlying.clear() }
1890
1890
}
1891
-
1892
- trait ValueElement extends Element {
1893
- val underlying : WebElement
1894
1891
1895
- def checkCorrectType (isA : (TagMeta ) => Boolean , typeDescription : String )(implicit pos : source.Position ): Unit = {
1896
- if (! isA(TagMeta (underlying)))
1897
- throw new TestFailedException (
1892
+ private def checkCorrectType (underlying : WebElement , isA : (TagMeta ) => Boolean , typeDescription : String )(implicit pos : source.Position ): Unit = {
1893
+ if (! isA(TagMeta (underlying)))
1894
+ throw new TestFailedException (
1898
1895
(_ : StackDepthException ) => Some (" Element " + underlying + " is not " + typeDescription + " field." ),
1899
1896
None ,
1900
1897
pos
1901
1898
)
1902
- }
1899
+ }
1900
+
1901
+ trait ValueElement extends Element {
1902
+ val underlying : WebElement
1903
1903
1904
1904
/**
1905
1905
* Gets this field's value.
@@ -1956,7 +1956,7 @@ trait WebBrowser {
1956
1956
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a email field
1957
1957
*/
1958
1958
final class EmailField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
1959
- checkCorrectType(isEmailField, " email" )
1959
+ checkCorrectType(underlying, isEmailField, " email" )
1960
1960
}
1961
1961
1962
1962
/**
@@ -1975,7 +1975,7 @@ trait WebBrowser {
1975
1975
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a color field
1976
1976
*/
1977
1977
final class ColorField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
1978
- checkCorrectType(isColorField, " color" )
1978
+ checkCorrectType(underlying, isColorField, " color" )
1979
1979
}
1980
1980
1981
1981
/**
@@ -1994,7 +1994,7 @@ trait WebBrowser {
1994
1994
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a date field
1995
1995
*/
1996
1996
final class DateField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
1997
- checkCorrectType(isDateField, " date" )
1997
+ checkCorrectType(underlying, isDateField, " date" )
1998
1998
}
1999
1999
2000
2000
/**
@@ -2013,7 +2013,7 @@ trait WebBrowser {
2013
2013
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a datetime field
2014
2014
*/
2015
2015
final class DateTimeField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2016
- checkCorrectType(isDateTimeField, " datetime" )
2016
+ checkCorrectType(underlying, isDateTimeField, " datetime" )
2017
2017
}
2018
2018
2019
2019
/**
@@ -2032,7 +2032,7 @@ trait WebBrowser {
2032
2032
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a datetime-local field
2033
2033
*/
2034
2034
final class DateTimeLocalField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2035
- checkCorrectType(isDateTimeLocalField, " datetime-local" )
2035
+ checkCorrectType(underlying, isDateTimeLocalField, " datetime-local" )
2036
2036
}
2037
2037
2038
2038
/**
@@ -2051,7 +2051,7 @@ trait WebBrowser {
2051
2051
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a month field
2052
2052
*/
2053
2053
final class MonthField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2054
- checkCorrectType(isMonthField, " month" )
2054
+ checkCorrectType(underlying, isMonthField, " month" )
2055
2055
}
2056
2056
2057
2057
/**
@@ -2070,7 +2070,7 @@ trait WebBrowser {
2070
2070
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a number field
2071
2071
*/
2072
2072
final class NumberField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2073
- checkCorrectType(isNumberField, " number" )
2073
+ checkCorrectType(underlying, isNumberField, " number" )
2074
2074
}
2075
2075
2076
2076
/**
@@ -2089,7 +2089,7 @@ trait WebBrowser {
2089
2089
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a range field
2090
2090
*/
2091
2091
final class RangeField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2092
- checkCorrectType(isRangeField, " range" )
2092
+ checkCorrectType(underlying, isRangeField, " range" )
2093
2093
}
2094
2094
2095
2095
/**
@@ -2108,7 +2108,7 @@ trait WebBrowser {
2108
2108
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a search field
2109
2109
*/
2110
2110
final class SearchField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2111
- checkCorrectType(isSearchField, " search" )
2111
+ checkCorrectType(underlying, isSearchField, " search" )
2112
2112
}
2113
2113
2114
2114
/**
@@ -2127,7 +2127,7 @@ trait WebBrowser {
2127
2127
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a tel field
2128
2128
*/
2129
2129
final class TelField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2130
- checkCorrectType(isTelField, " tel" )
2130
+ checkCorrectType(underlying, isTelField, " tel" )
2131
2131
}
2132
2132
2133
2133
/**
@@ -2146,7 +2146,7 @@ trait WebBrowser {
2146
2146
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a time field
2147
2147
*/
2148
2148
final class TimeField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2149
- checkCorrectType(isTimeField, " time" )
2149
+ checkCorrectType(underlying, isTimeField, " time" )
2150
2150
}
2151
2151
2152
2152
/**
@@ -2165,7 +2165,7 @@ trait WebBrowser {
2165
2165
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a url field
2166
2166
*/
2167
2167
final class UrlField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2168
- checkCorrectType(isUrlField, " url" )
2168
+ checkCorrectType(underlying, isUrlField, " url" )
2169
2169
}
2170
2170
2171
2171
/**
@@ -2184,7 +2184,7 @@ trait WebBrowser {
2184
2184
* @throws TestFailedExeption if the passed <code>WebElement</code> does not represent a week field
2185
2185
*/
2186
2186
final class WeekField (val underlying : WebElement )(implicit pos : source.Position ) extends ValueElement {
2187
- checkCorrectType(isWeekField, " week" )
2187
+ checkCorrectType(underlying, isWeekField, " week" )
2188
2188
}
2189
2189
2190
2190
/**
0 commit comments