https://github.com/robotcourses/robotframework-browserstack
https://github.com/robotcourses/robotframework-browserstack
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/robotcourses/robotframework-browserstack
- Owner: robotcourses
- License: apache-2.0
- Created: 2024-07-23T16:04:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-27T05:10:14.000Z (almost 2 years ago)
- Last Synced: 2025-11-27T19:50:30.066Z (7 months ago)
- Language: Python
- Size: 41.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Browserstack library for RobotFramework
==================================================
Introduction
------------
`BrowserstackLibrary`_ is a keyword library for integration with Browserstack for mobile testing using `Robot Framework`_ and **AppiumLibrary**. Library can be downloaded from **PyPI**.
Before installing the library in your project, ensure that you or your project have access credentials to Browserstack.
If you don't have one, go to https://www.browserstack.com to register.
It is supporting Python 3.8+
Appium Library Dependency
------------
Some BrowserstackLibrary keywords use AppiumLibrary instances so they can be executed. Therefore, your project needs to have the Appium Library installed.
Later, support for WEB testing will be added.
Keyword Documentation
---------------------
Access `Keyword Documentation`_ to see available keywords.
Installation
------------
**Option 1** :: With Pip
pip install robotframework-browserstacklibrary
**Option 2** :: With Poetry
poetry add robotframework-browserstacklibrary
Usage
-----
Below is an example of using the Browserstack Library together with the Robot Framework and Appium Library:
.. code:: robotframework
*** Settings ***
Library AppiumLibrary
Library BrowserstackLibrary username=${BS_USERNAME} access_key=${BS_ACCESS_KEY}
Test Teardown Run Keywords
... Update Test Case Status in BrowserStack
... Close Application
Resource base.resource
*** Test Cases ***
Olá Mundo
${bs_url} Upload Application to Browserstack
... app_name=ted.apk
... app_path=app/app.apk
... custom_id=TED_OUVINTE_123
Open Application In Browserstack
... automationName=uiautomator2
... platformName=${PLATFORM_NAME}
... deviceName=${DEVICE_NAME}
... app=${bs_url}
... project=${BROWSERSTACK_PROJECT}
... build=TED
... name=${TEST_NAME}
... bstack:options=${BROWSERSTACK_OPTIONS}
... browserstack.networkLogs=${True}
... browserstack.networkLogsOptions.captureContent=${True}
... autoGrantPermissions=${True}
... autoAcceptAlerts=${True}
... disableIdLocatorAutocompletion=${True}
... browserstack.idleTimeout=60
... interactiveDebugging=${True}
Wait Until Element Is Visible Next
Click Element Next
Create a file with the content above (name it: ``test_file.robot``) and execute:
robot -d log test_file.robot
Another example, containing the keywords from the Browserstack Library, in a more structured way is in https://github.com/robotcourses/RF_Appium
.. _BrowserstackLibrary: https://github.com/robotcourses/robotframework-browserstack
.. _Robot Framework: https://robotframework.org
.. _PyPI: https://pypi.org/project/robotframework-appiumlibrary/
.. _Keyword Documentation: https://robotcourses.github.io/robotframework-browserstack/BrowserstackLibrary.html