Clerythecleric Posted November 16, 2017 Share Posted November 16, 2017 (edited) Hello, Sorry if this is in the wrong place. I'm writing a script to help at work with some data analysis. I'm pretty much finished however I need to check the status of 2 checkboxes and if they are unchecked/checked act accordingly. I'm just unsure how to get this information? Im thinking i have to use the _FFXpath however I've not done anything with this before. I know i can select/deselect the checkbox using the following; _FFFormCheckBox("ASR", True, 0, "value") However before doing this i need to see if the box was already ticked? Any advice would be appreciated as I've been looking into this for the past 2 hours and made no progress. If someone can please give an example of this done on any other page and i can check the source and adapt for my own. This is done on Firefox, The checkbox HTML is below. I just need a way to see if this is ticked or not? I know in Autoit GUI you can use GUICtrlRead and in windows apps you can use the commandcontrol however how can I do this in FF please? Thank you. <input name="vl2nck" value="ASR" type="checkbox"> Edited November 16, 2017 by Clerythecleric Link to comment Share on other sites More sharing options...
Danp2 Posted November 16, 2017 Share Posted November 16, 2017 There's an example for _FFXPath here. The last line shows checking the element. You should be able to do something similar to retrieve it's current value. I would try something like this -- _FFXPath("<xpath for your checkbox goes here>") If @error = $_FF_ERROR_Success Then MsgBox(64,"IsChecked?", _FFCmd("FFau3.xpath.checked") EndIf Latest Webdriver UDF Release Webdriver Wiki FAQs 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