Capability.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * Copyright 2012-2017 Anthon Pang. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. * @package WebDriver
  18. *
  19. * @author Anthon Pang <apang@softwaredevelopment.ca>
  20. */
  21. namespace WebDriver\SauceLabs;
  22. use WebDriver\Capability as BaseCapability;
  23. /**
  24. * WebDriver\SauceLabs\Capability class
  25. *
  26. * @package WebDriver
  27. */
  28. class Capability extends BaseCapability
  29. {
  30. /**
  31. * Desired capabilities - SauceLabs
  32. *
  33. * @see https://saucelabs.com/docs/additional-config
  34. */
  35. // Job Annotation
  36. const NAME = 'name'; // Name the job
  37. const BUILD = 'build'; // Record the build number
  38. const TAGS = 'tags'; // Tag your jobs
  39. const PASSED = 'passed'; // Record pass/fail status
  40. const CUSTOM_DATA = 'custom-data'; // Record custom data
  41. // Performance improvements and data collection
  42. const RECORD_VIDEO = 'record-video'; // Video recording
  43. const VIDEO_UPLOAD_ON_PASS = 'video-upload-on-pass'; // Video upload on pass
  44. const RECORD_SCREENSHOTS = 'record-screenshots'; // Record step-by-step screenshots
  45. const CAPTURE_HTML = 'capture-html'; // HTML source capture
  46. const QUIET_EXCEPTIONS = 'webdriver.remote.quietExceptions'; // Enable Selenium 2's automatic screenshots
  47. const SAUCE_ADVISOR = 'sauce-advisor'; // Sauce Advisor
  48. // Selenium specific
  49. const SELENIUM_VERSION = 'selenium-version'; // Use a specific Selenium version
  50. const SINGLE_WINDOW = 'single-window'; // Selenium RC's single window mode
  51. const USER_EXTENSIONS_URL = 'user-extensions-url'; // Selenium RC's user extensions
  52. const FIREFOX_PROFILE_URL = 'firefox-profile-url'; // Selenium RC's custom Firefox profiles
  53. // Timeouts
  54. const MAX_DURATION = 'max-duration'; // Set maximum test duration
  55. const COMMAND_TIMEOUT = 'command-timeout'; // Set command timeout
  56. const IDLE_TIMEOUT = 'idle-timeout'; // Set idle test timeout
  57. // Sauce specific
  58. const PRERUN = 'prerun'; // Prerun executables
  59. const TUNNEL_IDENTIFIER = 'tunnel-identifier'; // Use identified tunnel
  60. const SCREEN_RESOLUTION = 'screen-resolution'; // Use specific screen resolution
  61. const DISABLE_POPUP_HANDLER = 'disable-popup-handler'; // Disable popup handler
  62. const AVOID_PROXY = 'avoid-proxy'; // Avoid proxy
  63. const DEVICE_ORIENTATION = 'deviceOrientation'; // Device orientation (portrait or landscape)
  64. const DEVICE_TYPE = 'deviceType'; // Device type (phone or tablet)
  65. // Job Sharing
  66. const PUBLIC_RESULTS = 'public'; // Make public, private, or share jobs
  67. }