Our main navigation bar uses JavaScript to set the action of a form, then submit that form to go to a specified page. So for example, if you want to go to Page X, you call this JavaScript function with the argument "/path/X.ext". This will then set the form action to "/path/X.ext" and submit the form (among other things).
I'm not a big fan of the design of this either, but I can't do anything about it right now.
Anyway, no matter what I try, I can't get the WebResponse to be the contents of "/path/X.ext". I have tried click()ing the WebLink, submit()ing the WebForm manually (remember it's action is the current page until JavaScript changes it), doing both, doing both then returning WebConversation.getCurrentPage(). All to no avail. It always returns the contents of the current page.
Can I manually change the action of the form, or maybe use WebForm.Scriptable objects to help me out?
Any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Our main navigation bar uses JavaScript to set the action of a form, then submit that form to go to a specified page. So for example, if you want to go to Page X, you call this JavaScript function with the argument "/path/X.ext". This will then set the form action to "/path/X.ext" and submit the form (among other things).
I'm not a big fan of the design of this either, but I can't do anything about it right now.
Anyway, no matter what I try, I can't get the WebResponse to be the contents of "/path/X.ext". I have tried click()ing the WebLink, submit()ing the WebForm manually (remember it's action is the current page until JavaScript changes it), doing both, doing both then returning WebConversation.getCurrentPage(). All to no avail. It always returns the contents of the current page.
Can I manually change the action of the form, or maybe use WebForm.Scriptable objects to help me out?
Any ideas?