-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?

3
  • Please outline details in question itself and only use links as support for those details. We shouldn't have to assimilate what is in multiple links to figure out your full issue. Questions should be self contained Commented Jun 5, 2016 at 15:18
  • 1
    Did you try using setTimeout? Commented Jun 5, 2016 at 15:20
  • yes i tried doLogin with setTimeout 20000 - same error Commented Jun 5, 2016 at 16:09

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.