tommytx Posted September 26, 2014 Posted September 26, 2014 Am I doing something wrong here.. does not seem to work... none of them had and id so can't use that. My html <input name="first_name" value="" required=""> <input name="last_name" value="" required=""> <input name="email" value="" required="" type="email"> <textarea rows="7" cols="10" name="message" id="message" class="autosave" end html _FFSetValue("Tommy","first_name") _FFSetValue("Chandler","last_name") _FFSetValue("joe@boe.com","email") _FFSetValue("Now is the time for all good men.", "message")
Solution Danp2 Posted September 26, 2014 Solution Posted September 26, 2014 Have you tried with the optional $sMode parameter set to "name"? _FFSetValue("Tommy","first_name","name") Latest Webdriver UDF Release Webdriver Wiki FAQs
tommytx Posted September 26, 2014 Author Posted September 26, 2014 Thanks for the assist... Does not fill it in but gives this at the end.. __FFSend ==> Socket Error _FFCmd ==> Error return value _FFSetValue ==> No match: $sElement: .getElementsByName('first_name')[0] >Exit code: 0 Time: 4.178
tommytx Posted September 26, 2014 Author Posted September 26, 2014 its all inside a form but the form has no id... if i need to id the form I suppose i could give it a number since its the only form on the page has no id and no name for the form...
Danp2 Posted September 26, 2014 Posted September 26, 2014 This is a function I use in one of my scripts. Perhaps you will find it useful: Func UpdateWebForm($cField, $cValue) ; Remove non-alphanumeric characters such as quotation marks $cValue = StringRegExpReplace($cValue, "[^\w\d\s]", "") _FFXPath("//form//input[@name='" & $cField & "']") _FFCmd("FFau3.xpath.value='" & $cValue & "'") EndFunc Latest Webdriver UDF Release Webdriver Wiki FAQs
tommytx Posted September 26, 2014 Author Posted September 26, 2014 Danp2 thank you so much I have no idea what I just did but i found this _FFSetValue("1", "amount", "name",0) _FFSetValue("1", "amount", "name",1) _FFSetValue("1", "amount", "name",2) _FFSetValue("1", "amount", "name",3) at this site http://www.autoit.de/index.php?page=Thread&threadID=24003 so having no idea what I am doing... I took your solution _FFSetValue("Tommy","first_name","name") and added the 0 at the end... and walla it works fine.. _FFSetValue("Tommy","first_name","name", 0) so thanks again.. you set me on the right road... can you explain what happened there.. maybe it will help me in the future.
tommytx Posted September 26, 2014 Author Posted September 26, 2014 Ok... sorrry.. forgive me for trying to screw everybody's mind up... the 0 had nothing to do with it... your solution as written worked perfect.. thanks again...
Danp2 Posted September 26, 2014 Posted September 26, 2014 Open FF.au3 and examine the definition of _FFSetValue. The 4th parameter ($iIndex) is optional and defaults to zero if you don't provide one. Latest Webdriver UDF Release Webdriver Wiki FAQs
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