How do you test a reactjs web app with selenium? How do you test a reactjs web app with selenium? selenium selenium

How do you test a reactjs web app with selenium?


Try Simulate in the React TestUtils addon:

React.addons.TestUtils.Simulate.change(document.getElementById('your-id-here'))

See http://facebook.github.io/react/docs/test-utils.html#simulate

It also requires that you switch to the React file containing the addons:

"To get the add-ons, use react-with-addons.js (and its minified counterpart) rather than the common react.js." — http://facebook.github.io/react/docs/addons.html


import ReactTestUtils from 'react-addons-test-utils'    // ES6var ReactTestUtils = require('react-addons-test-utils') // ES5 with npmvar ReactTestUtils = React.addons.TestUtils;            // ES5 with react-with-addons.js

wrap that in a python library and load it in RF...
Hopefully it will work.