There are a few things wrong here:
1. Your selector is insanely long. If you ever change your HTML you are
going to be fixing tests for years. Try to use the most minimal selectors
you can.
2. There is a whole form-control shortcut section in the manual.
http://gebish.herokuapp.com/manual/current/#form-control-shortcuts - You
can reference form fields directly using their 'name' attributes. See below.
Try:
// in your 'content' block
registerForm { $('#registerForm') }
// in your test, just do:
registerForm.policy = true
Cheers,
Antony
On Wednesday, May 31, 2017 at 11:23:56 AM UTC+1, [email protected] wrote:
>
> hi,
>
> I need help by checking a checkbox.
>
> tried to ".click" it and also check it with "<< Keys.ENTER"
>
> registerForm(required: false) { $("form", id: "registerForm") }
>
> registerFormCheckbox (required: false) {registerForm.find("div",
> class:"col-xs-12 col-sm-12 pull-left").find("div", class:"checkbox
> check-box")[0].$("label", class:"check-label control-label ").$("svg",
> class:"ui-icon ui-icon--check")}
>
>
> <div class="register-form-action row">
> <div class="col-xs-12 col-sm-12 pull-left">
> <span class="register-checkboxes">
> <div class="checkbox check-box">
> <input id="Ich stimme der Verarbeitung meiner personenbezogenen Daten
> gemäß der Datenschutzerklärung von abc zu." name="policy" type="checkbox"
> value="true"/>
> <input type="hidden" name="_policy" value="on"/>
> <label class="check-label control-label " for="Ich stimme der
> Verarbeitung meiner personenbezogenen Daten gemäß der Datenschutzerklärung
> von abc zu.">
> Ich stimme der Verarbeitung meiner personenbezogenen Daten gemäß der
> Datenschutzerklärung von abc zu.
> <span class="mandatory"/>
> <span class="skip"/>
> <svg class="ui-icon ui-icon--check">
> <use xlink:href="#sprite-icons--check"/>
> </svg>
> </label>
> </div>
> </span>
> </div>
> <div class="col-xs-12 col-sm-12 pull-left">
> </div>
>
> but somehow it does not work. Any idea or hint?
> thanks in advance!
>
--
You received this message because you are subscribed to the Google Groups "Geb
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/c28e7c2c-f16a-49f3-9eda-bf2d3c971418%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.