NirKlieman Posted May 31, 2015 Share Posted May 31, 2015 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted May 31, 2015 Developers Share Posted May 31, 2015 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 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
NirKlieman Posted May 31, 2015 Author Share Posted May 31, 2015 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. Link to comment Share on other sites More sharing options...
232showtime Posted May 31, 2015 Share Posted May 31, 2015 if i were you I will post my script so i can get help from the expert coder... ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
danyhack Posted May 31, 2015 Share Posted May 31, 2015 i think that you can risolve with this:$oFrame = _IEFrameGetCollection($oIE, 1) $emailElement = _IEGetObjByName($oFrame, "default_cli") _IEAction($emailElement, 'focus') Sleep(500) _IEPropertySet ( $emailElement, "innertext", "myDefault CLI")god bless you! Link to comment Share on other sites More sharing options...
NirKlieman Posted June 7, 2015 Author Share Posted June 7, 2015 Thanks all. The same behavior repeats when I used danyhack code. Any more suggestions?Does anyone saw similiar bahvior on IE 10 ? Link to comment Share on other sites More sharing options...
Developers Jos Posted June 7, 2015 Developers Share Posted June 7, 2015 The same behavior repeats when I used danyhack code.Do I want to know what that means?Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Danp2 Posted June 7, 2015 Share Posted June 7, 2015 Probably referring to this. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
NirKlieman Posted June 7, 2015 Author Share Posted June 7, 2015 Probably referring to this.Yes Danp2, when I used $oFrame = _IEFrameGetCollection($oIE, 1) $emailElement = _IEGetObjByName($oFrame, "default_cli") _IEAction($emailElement, 'focus') Sleep(500) _IEPropertySet ( $emailElement, "innertext", "myDefault CLI")The same behaviot happenes ( I saw the lines updated but the site didn't save the data) Link to comment Share on other sites More sharing options...
NirKlieman Posted June 8, 2015 Author Share Posted June 8, 2015 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 !! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now