-1

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?

Community
  • 1
  • 1
changtung
  • 1,614
  • 15
  • 19

1 Answers1

0

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()

Steffen
  • 3,327
  • 2
  • 26
  • 30