I'm trying to automate this page: http://www.zoopla.co.uk/friend/42816744?section=for-sale&search_identifier=6323219902a84fc51cd97861178ef6ce
For the submit button I've tried using both of these findBy:
@FindBy(id="friend_submit")
@FindBy(xpath="//input[@type='submit']")
It works fine using ChromeDriver, I can fill in the form and then submit it and see the "Thank you" message on the next page.
When using phantomJS if I just leave the fields blank and click the button I get the "This field is required." message displayed on the page and the test passes.
When using real valid data and click the button nothing happens, I just stay on the page. I take a screenshot when the test fails and I can see I am on the same form page with all the data correctly entered into the fields but for some reason the form isn't submitted.
As I say it works fine with ChromeDriver.
I've tried using the java script executor, calling.submit() on the element, calling submit() on other elements in the form, waiting before and after clicking the button, scrolling to the web element, used many different versions of phantomjs.exe including beta versions (I'm using the webdrivermanager https://github.com/bonigarcia/webdrivermanager), set the screensize to full screen, custom screen sizes, maximised, set the desired capabilities to allow all ssl, set different user agents, enabled javascript...
I really don't know what else to try.
Please can anyone have a look and see if they can get this page to submit using phantomJS and Java? Or suggest anything I could try.