无法选中GEB中的复选框 [英] Unable to check the checkbox in GEB

查看:253
本文介绍了无法选中GEB中的复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Geb检查我的复选框。

I am trying to check my check box in Geb.

我试过以下代码,但没有运气

I have tried following codes, but no luck

$('input', type:'checkbox', id: 'chkTermsConditions', tabindex: '-1').value('true')
$(".CheckBoxUI").value('true')

以下是HTML

鼠标移到复选框后,更新了附加文本(在屏幕截图中标出)

After mouse go over the check box additional text updated (marked in the screen shot)

推荐答案

$(CheckBoxStyle)。click()

只有问题仍然是 按钮未启用。以下是在实际情况下检查复选框之前和之后的html代码。

Only issue is still Submit button doesn't get enable. Following is the html code for before and after checking the check box in real situation.

我试过点击提交按钮,并显示以下代码。它不给任何错误。但仍然不会按预期移动到下一页。可能是因为提交按钮禁用问题。

I tried the to click on the submit button with following code. It doesn't give any error. But still doesn't move to next page as expected.May be because of Submit button disable issue.

$("#submitBtnMsg").click()

已修改:

以上是与应用程序相关的问题。选择通过地址验证服务后,我们必须点击地址。然后只有提交按钮才能启用。

It was turned out above was application related issue. We have to click on the address after selecting via address validation service. Then only Submit button get enable.

$(".RedColor").click()

这篇关于无法选中GEB中的复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆