File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ ** 0.08 / 2018-03-21
2+ - Add get_property for W3C / Selenium3 compatibility
3+
14** 0.06 / 2016-10-03
25 - Make 'get_page_source' write info a file
36
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Weasel::Driver::Selenium2 - Weasel driver wrapping Selenium::Remote::Driver
55
66=head1 VERSION
77
8- 0.06
8+ 0.08
99
1010=head1 SYNOPSIS
1111
@@ -52,7 +52,7 @@ use Weasel::DriverRole;
5252use Moose;
5353with ' Weasel::DriverRole' ;
5454
55- our $VERSION = ' 0.06 ' ;
55+ our $VERSION = ' 0.08 ' ;
5656
5757
5858=head1 ATTRIBUTES
@@ -123,13 +123,14 @@ see L<Weasel::DriverRole>.
123123=cut
124124
125125sub implements {
126- return ' 0.02 ' ;
126+ return ' 0.03 ' ;
127127}
128128
129129=item start
130130
131131A few capabilities can be specified in t/.pherkin.yaml
132132Some can even be specified as environment variables, they will be expanded here if present.
133+ Revised for Selenium3. See https://github.com/teodesian/Selenium-Remote-Driver#no-standalone-server
133134
134135=cut
135136
@@ -268,7 +269,21 @@ sub execute_script {
268269sub get_attribute {
269270 my ($self , $id , $att ) = @_ ;
270271
271- return $self -> _resolve_id($id )-> get_attribute($att );
272+ return $self -> _resolve_id($id )-> get_attribute($att , 1);
273+ }
274+
275+ =item get_property($id, $prop_name)
276+
277+ With Selenium 2, the method WebElement.GetAttribute(...) returned the HTMLElement
278+ property when present and the attribute otherwise.
279+ The methods are separated in Selenium 3
280+
281+ =cut
282+
283+ sub get_property {
284+ my ($self , $id , $property ) = @_ ;
285+
286+ return $self -> _resolve_id($id )-> get_property($property );
272287}
273288
274289=item get_page_source($fh)
You can’t perform that action at this time.
0 commit comments