Page 1 of 1

checkbox validation

Posted: Thu May 18, 2017 4:05 pm
by Nono
Hi,

So I know it's a rather simple issue but all the answers I've looked up online did not help, so..
How can I verify that the object in question (a checkbox within a web page) is checked or not?
see snapshot included. Nothing helps :\
please note-once created the function, the repository object looks like this in my function declaration:
RepoItemInfo divtagInfo

thanks...

Re: checkbox validation

Posted: Thu May 18, 2017 6:23 pm
by Vaughan.Douglas
Thank you for posting the SnapShot, this would have gone a whole other direction without it.

The problem you're facing is that it is not a checkbox, so you can't validate a check state. If you jump up to the DIV parent of the Span, you'll notice it's class is "r-checkbox selected". If you do the same for the other 3 similar checkboxes, you'll see that the checked ones are r-checkbox selected and the unchecked ones are r-checkbox.

So if you're trying to validate this as "checked" versus "unchecked", I'd find the DIV tag by the innertext property and validate that its class attribute is r-checkbox selected.

Re: checkbox validation

Posted: Sun May 21, 2017 4:34 pm
by Nono
that solved my problem - thank you!