Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sendKeys method #767

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add setAutocompleteValue method
  • Loading branch information
JordiGiros committed Oct 18, 2018
commit cef7fe88fe5384f6868741c69e629ac33f6e0099
8 changes: 8 additions & 0 deletions src/Driver/CoreDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ public function setValue($xpath, $value)
throw new UnsupportedDriverActionException('Setting the field value is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function setAutocompleteValue($xpath, $value)
{
throw new UnsupportedDriverActionException('Setting the field value is not supported by %s', $this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, that error message should mention, that value is set into an auto-complete field.

}

/**
* {@inheritdoc}
*/
Expand Down
13 changes: 13 additions & 0 deletions src/Driver/DriverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,19 @@ public function getValue($xpath);
*/
public function setValue($xpath, $value);

/**
* Sets autocomplete element's value by it's XPath query.
*
* @param string $xpath
* @param string|bool|array $value
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
* @throws DriverException When the operation cannot be done
*
* @see \Behat\Mink\Element\NodeElement::setAutocompleteValue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure, that mentioned method exists?

*/
public function setAutocompleteValue($xpath, $value);

/**
* Checks checkbox by it's XPath query.
*
Expand Down