क्षमताएं
एक क्षमता एक रिमोट इंटरफ़ेस की परिभाषा है। यह WebdriverIO को यह समझने में मदद करता है कि आप किस ब्राउज़र या मोबाइल वातावरण में अपने परीक्षण चलाना पसंद करते हैं। स्थानीय रूप से परीक्षण विकसित करते समय क्षमताएँ कम महत्वपूर्ण होती हैं क्योंकि आप इसे अधिकांश समय एक रिमोट इंटरफ़ेस पर चलाते हैं लेकिन CI/CD में एकीकरण परीक्षणों का एक बड़ा सेट चलाते समय यह अधिक महत्वपूर्ण हो जाता है।
एक क्षमता ऑब्जेक्ट का फोर्मेट वेबड्राइवर विनिर्देशद्वारा अच्छी तरह से परिभाषित किया गया है। यदि उपयोगकर्ता परिभाषित क्षमताएं उस विनिर्देश का पालन नहीं करती हैं तो WebdriverIO टेस्टरनर जल्दी विफल हो जाएगा।
कस्टम क्षमताएं
While the amount of fixed defined capabilities is very low, everyone can provide and accept custom capabilities that are specific to the automation driver or remote interface:
ब्राउज़र विशिष्ट क्षमता एक्सटेंशन
goog: chromeOptions
: Chromedriver एक्सटेंशन, केवल क्रोम में परीक्षण के लिए लागूmoz:firefoxOptions
: Geckodriver एक्सटेंशन, केवल फायरफॉक्स में परीक्षण के लिए लागूms:edgeOptions
: EdgeOptions क्रोमियम एज के परीक्षण के लिए EdgeDriver का उपयोग करते समय परिवेश निर्दिष्ट करने के लिए
क्लाउड व ेंडर क्षमता एक्सटेंशन
sauce:options
: Sauce Labsbstack:options
: BrowserStacktb:options
: TestingBot- और भी कई...
स्वचालन इंजन क्षमता एक्सटेंशन
WebdriverIO Capabilities to manage browser driver options
WebdriverIO manages installing and running browser driver for you. WebdriverIO uses a custom capability that allows you to pass in parameters to the driver.
Common Driver Options
While all driver offer different parameters for configuration, there are some common ones that WebdriverIO understand and uses for setting up your driver or browser:
cacheDir
The path to the root of the cache directory. This directory is used to store all drivers that are downloaded when attempting to start a session.
Type: string
Default: process.env.WEBDRIVER_CACHE_DIR || os.tmpdir()
binary
Path to a custom driver binary. If set WebdriverIO won't attempt to download a driver but will use the one provided by this path. Make sure the driver is compatible with the browser you are using.
Type: string