WebDriverMouse.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. // Copyright 2004-present Facebook. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. namespace Facebook\WebDriver;
  16. use Facebook\WebDriver\Interactions\Internal\WebDriverCoordinates;
  17. /**
  18. * Interface representing basic mouse operations.
  19. */
  20. interface WebDriverMouse
  21. {
  22. /**
  23. * @param WebDriverCoordinates $where
  24. * @return WebDriverMouse
  25. */
  26. public function click(WebDriverCoordinates $where);
  27. /**
  28. * @param WebDriverCoordinates $where
  29. * @return WebDriverMouse
  30. */
  31. public function contextClick(WebDriverCoordinates $where);
  32. /**
  33. * @param WebDriverCoordinates $where
  34. * @return WebDriverMouse
  35. */
  36. public function doubleClick(WebDriverCoordinates $where);
  37. /**
  38. * @param WebDriverCoordinates $where
  39. * @return WebDriverMouse
  40. */
  41. public function mouseDown(WebDriverCoordinates $where);
  42. /**
  43. * @param WebDriverCoordinates $where
  44. * @param int $x_offset
  45. * @param int $y_offset
  46. * @return WebDriverMouse
  47. */
  48. public function mouseMove(
  49. WebDriverCoordinates $where,
  50. $x_offset = null,
  51. $y_offset = null
  52. );
  53. /**
  54. * @param WebDriverCoordinates $where
  55. * @return WebDriverMouse
  56. */
  57. public function mouseUp(WebDriverCoordinates $where);
  58. }