Hello,
I desparetly need to fill a form (field) with a jquery button disabled(submit). The button get activated only if I fill it with my keyboard (real keypress). I tried many things to get it work but I am now desperate to know if a solution really exist.
The field I am talking about is on my personal mail account but I found a really similar for testing purpose.
#include <_FF.au3>
#include <File.au3>
#include <Array.au3>
$url = "http://www.revillweb.com/demos/jQueryDisableButton/jqueryDisableButton.html"
RunWait("C:\Program Files\FirefoxPortable\FirefoxPortable.exe")
Sleep(1000)
_FFConnect("127.0.0.1", 4242)
Sleep(2000)
;_FFOpenURL($url)
_FFLoadWait()
Sleep(1000)
;Fill the field but does not activate the button near
$input = _FFXPath('//*[@id="searchInput"]')
_FFSetValue('test', $input, 'elements')
$pos = _FFGetPosition($input)
;None of them work
;~ _FFDispatchEvent($input, 'blur')
;~ _FFDispatchEvent($input, 'select')
;~ _FFDispatchEvent($input, 'focus')
;~ _FFDispatchEvent($input, 'click')
;~ _FFDispatchEvent($input, 'mousedown')
;~ _FFDispatchEvent($input, 'keydown', 13)
;~ _FFFormSubmit('submit', 'name')
;~ _FFCmd($input & ".selected")
;~ _FFSetValue('123', $input, 'elements')
;~ _FFDispatchKeyEvent($input, 13, 'keypress') ; pressing "enter" on the input-field
;I could do something crappy like that but, thing is that I got weird control coordinates that needs to be reajusted....
Opt("WinTitleMatchMode", 2)
$win = "Mozilla Firefox"
WinActivate($win, "")
Opt("MouseCoordMode", 2)
Mousemove($pos[0] + 5,$pos[1] + 100)
MouseClick("left", $pos[0] + 5,$pos[1] + 100)
;Still disabled, I would need to send keystrokes.
_FFSetValue('test', $input, 'elements')
If somebody has an idea please ?
Kind Regards.