{"id":18817055,"url":"https://github.com/marketsquare/robotframework-react","last_synced_at":"2025-04-13T22:33:28.623Z","repository":{"id":48670247,"uuid":"91888940","full_name":"MarketSquare/robotframework-react","owner":"MarketSquare","description":"A Robot Framework library for React","archived":false,"fork":false,"pushed_at":"2021-07-14T23:49:35.000Z","size":459,"stargazers_count":24,"open_issues_count":9,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T13:44:56.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarketSquare.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-20T12:51:26.000Z","updated_at":"2024-06-18T09:44:08.000Z","dependencies_parsed_at":"2022-08-27T07:31:47.598Z","dependency_job_id":null,"html_url":"https://github.com/MarketSquare/robotframework-react","commit_stats":null,"previous_names":["kitconcept/robotframework-react"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarketSquare","download_url":"https://codeload.github.com/MarketSquare/robotframework-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790876,"owners_count":21162105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T00:09:02.363Z","updated_at":"2025-04-13T22:33:23.411Z","avatar_url":"https://github.com/MarketSquare.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============================================================================\nA Robot Framework library for React.\n==============================================================================\n\n.. image:: https://travis-ci.org/kitconcept/robotframework-react.svg?branch=master\n    :target: https://travis-ci.org/kitconcept/robotframework-react\n\n.. image:: https://img.shields.io/pypi/status/robotframework-react.svg\n    :target: https://pypi.python.org/pypi/robotframework-react/\n    :alt: Egg Status\n\n.. image:: https://img.shields.io/pypi/v/robotframework-react.svg\n    :target: https://pypi.python.org/pypi/robotframework-react/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/l/robotframework-react.svg\n    :target: https://pypi.python.org/pypi/robotframework-react/\n    :alt: License\n\n|\n\n.. image:: https://raw.githubusercontent.com/kitconcept/robotframework-react/master/kitconcept.png\n   :alt: kitconcept\n   :target: https://kitconcept.com/\n\n\nIntroduction\n------------\n\nReactLibrary is a Robot Framework library for React. It currently provides a single 'Wait for React' keyword that makes sure your React application has been fully loaded and can be interacted with.\n\n\nInstallation\n------------\n\nInstall robotframework-react with pip::\n\n  $ pip install robotframework-react\n\n\nUsage\n-----\n\nIn order to write your first robot test, make sure that you include SeleniumLibrary and ReactLibrary. Create a test.robot file with the following content::\n\n  *** Settings ***\n\n  Library         SeleniumLibrary  timeout=10  implicit_wait=0\n  Library         ReactLibrary\n  Suite Setup     Open browser  https://airbnb.com  chrome\n  Suite Teardown  Close browser\n\n\n  *** Test Cases ***\n\n  Scenario: Wait for react\n    Go To  https://airbnb.com\n    Wait for react\n    Page Should Contain  Airbnb Book unique homes\n\n  Scenario: Wait for react with reducer\n    Go To  https://airbnb.com\n    Wait for react  reducer=headlines\n    Page Should Contain  Airbnb Book unique homes\n\n\nKeywords\n--------\n\nrobotframework-react currently only provides a single keyword \"Wait for React\".\nThe keyword makes sure the React app is fully loaded.\n\n\nPlain React Example\n^^^^^^^^^^^^^^^^^^^\n\nWhen used without any parameter, \"Wait for react\" expects the React app to\nset a global variable named \"window.appStatus\" to true when the app is fully\nloaded.\n\nTo make this work with your React app, add a global window.appStatus to your\nindex.js::\n\n  window.appStatus = false\n  const updateStatus = () =\u003e {\n    window.appStatus = true\n  }\n\n  ReactDOM.render(\u003cApp updateStatus={updateStatus} /\u003e, document.getElementById('root'));\n\nAdd an \"isLoading\" state to your App and update it on componentDidMount and componentDidUpdate (App.js)::\n\n  class App extends Component {\n    state = {\n      isLoading: true,\n    }\n\n    componentDidMount() {\n      wait(2000).then(() =\u003e {\n        this.setState({ isLoading: false })\n      })\n    }\n\n    componentDidUpdate() {\n      if (!this.state.isLoading) {\n        this.props.updateStatus()\n      }\n    }\n    ...\n  }\n\nYou can find a full working example here: https://github.com/kitconcept/robotframework-react/tree/master/tests/create-react-app\n\nRobot Test: https://github.com/kitconcept/robotframework-react/blob/master/tests/create-react-app/test.robot\n\nRedux\n^^^^^\n\nWhen working with Redux, you have to pass the name of the reducer to the 'Wait for React' keyword::\n\n  Wait for react  reducer=headlines\n\nThe reducer should implement an \"isFetching\" attribute in the Redux state::\n\n  const initialState = {\n    isFetching: false,\n    ...\n  };\n\nInstead of adding \"isFetching\", you can also name the attribute whatever you want, and pass in the \"stateName\" parameter to the 'Wait for react' keyboard::\n\n   Wait for react  reducer=headlines  stateName=isLoading\n\nYou can find a full working example here:\n\nhttps://github.com/kitconcept/robotframework-react/tree/master/tests/create-react-app-with-redux\n\nRobot Test with Redux:\n\nhttps://github.com/kitconcept/robotframework-react/blob/master/tests/create-react-app-with-redux/test.robot\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketsquare%2Frobotframework-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarketsquare%2Frobotframework-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketsquare%2Frobotframework-react/lists"}