Jump to content
Sign in to follow this  
NirKlieman

Form data is not saved

Recommended Posts

Hi all,

I'me pretty new on AutoIT world so forgive if the following question was answered before.

 

I want my AIT script to update a text-field on a specific html page of web-site:

therfore I login the site and when I enter the relevant section, I update the field by the following code:

 

$oFrame = _IEFrameGetCollection($oIE, 1)

$emailElement = _IEGetObjByName($oFrame, "default_cli")

_IEFormElementSetValue($emailElement, "myDefault CLI")

 

No error is returned, and I actually see that the relevant textbox is updated. But when I submit the page, the data is not saved - when I enter the page again I see that the data was not modified.

I'me using IE10 and when I try to use the 'Console mode' (F12) I see that the old data is sent with the submit.

 

The same behvaior happend with all sort of input (select etc).

 

Please help me,

Thanks

 

Nir

Share this post


Link to post
Share on other sites

There isn't enough info here to be able to help you.
What do you normally need to do after typing the new value in the field? Press a button on the form to save?

Jos

 

Share this post


Link to post
Share on other sites

Jos

 

 

Yes, I have submit button on which I press to save the form.

 

I think the key for the problem is somthing the IE - When I opened the console mode of the IE, I see that none of the new values is sent via the confirm button.

Share this post


Link to post
Share on other sites

The same behavior repeats when I used  danyhack  code.

​Do I want to know what that means?

Jos

Share this post


Link to post
Share on other sites

OK, I solve it.

The problem was somthing about Knockout code which were behind the page and prevents  third party programs (such as the AutoIT) to change the input. The key is to use 'execscript'.

The working code is: 

   $command = "top.main_frame.window.viewModel.default_cli('" & "myDefault CLI" & "');"
   $oIE.document.parentwindow.execscript($command)



Thanks for all of you !!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...