|
|
@@ -134,7 +134,7 @@ sub click {
|
|
|
that is a descendant of a FORM element.
|
|
|
|
|
|
Compatibility:
|
|
|
- On webdriver3 enabled servers, this uses a JS shim, which may not submit correctly depending on the element you are attempting to submit.
|
|
|
+ On webdriver3 enabled servers, this uses a JS shim, which WILL NOT submit correctly unless your element is an <input>.
|
|
|
Try clicking it if possible instead.
|
|
|
|
|
|
Usage:
|
|
|
@@ -144,7 +144,7 @@ sub click {
|
|
|
|
|
|
sub submit {
|
|
|
my ($self) = @_;
|
|
|
- return $self->driver->execute_script("if (typeof arguments[0].submit === 'function') { return arguments[0].submit(); }; return 0;", {'element-6066-11e4-a52e-4f735466cecf'=> $self->{id}} ) if $self->driver->{is_wd3} && !(grep { $self->driver->browser_name eq $_ } qw{chrome MicrosoftEdge});
|
|
|
+ return $self->driver->execute_script("return arguments[0].form.submit();",{'element-6066-11e4-a52e-4f735466cecf'=> $self->{id}} ) if $self->driver->{is_wd3} && !(grep { $self->driver->browser_name eq $_ } qw{chrome MicrosoftEdge});
|
|
|
my $res = { 'command' => 'submitElement', 'id' => $self->id };
|
|
|
return $self->_execute_command($res);
|
|
|
}
|