How to add extension for automation test in Behave for LambdaTest
If your webapp requires an extension for automation test in Behave for Lambdatest, you can use the following steps to upload extension and run your test. You can refer to sample test repo here.
Note: You will need the Chrome Extensions's ID for this. I am referring it to as
- Install your desired chrome extension on chrome.
- Go to Chrome's Extensions page (chrome://extensions/), Enable the developer mode (check the developer mode box) and take note of the ID for your desired extension.
- Your extension will be located at:
For Unix, ~/.config/google-chrome/Default/Extensions/$ID$
For Windows, C:\Users<Your_User_Name>\AppData\Local\Google\Chrome\User Data\Default\Extensions$ID$
For OSX, ~/Library/Application Support/Google/Chrome/Default/Extensions/$ID$
-
Copy the link to your extension which will look something like - https://automation-prod-user-files.s3.amazonaws.com/extensions/orgId-XXXX/2.1.0_0.zip
In the config.json file, you need to update the test capabilities and add the extension capability. For example:
[
{
"platform": "Windows 10",
"browserName": "chrome",
"version": "latest",
"build": "Behave Selenium Sample",
"name": "Behave Sample Test",
"lambda:loadExtension": "https://automation-prod-user-files.s3.amazonaws.com/extensions/orgId-XXXX/2.1.0_0.zip"
}
]
paver run
###Running tests through local (windows)
behave features/test.feature
paver run jenkins