I want to submit form with phantomjs. Page is written in React, so form doesn't render at execution time.
I want to exchange all javascript in loaded page, moving it to bottom - so then it will be possible to getelementbyid input. How to do this?
I want to submit form with phantomjs. Page is written in React, so form doesn't render at execution time.
I want to exchange all javascript in loaded page, moving it to bottom - so then it will be possible to getelementbyid input. How to do this?
You can use the componentDidMount lifecycle method of your react component. To access the actual DOM node of your component you can do something like const $component = $(ReactDOM.findDOMNode(this));
in react <0.14 you can access the DOM node by calling this.getDOMNode()