如何用Mink查找文本节点元素?
我想知道,我有这个 HTML:
<li>
<span class="jqTransformRadioWrapper">
<a rel="choices[choices]" class="jqTransformRadio jqTransformChecked" href = "#"></a>
<input type="radio" id="choices_choices_5" value="5" name="choices[choices]" class="jqTransformHidden">
</span>
<label for = "choices_choices_5" style = "cursor: pointer;">My awesome test</label>
</li>
你们中的一些人可能会意识到输入已被 jqTransformed
我想知道如何单击名为“My Awesome test”的标签。
现在,我这样做:
$el = $this->getSession()->getPage()->find('css', 'ul li span.jqTransformRadioWrapper a');
$el->click();
但它选择了第一个元素。 我想用他们的名字来选择他们(并且仅)对于这个例子来说,它将是“我很棒的测试”。
谢谢
I was wondering, i have this HTML :
<li>
<span class="jqTransformRadioWrapper">
<a rel="choices[choices]" class="jqTransformRadio jqTransformChecked" href = "#"></a>
<input type="radio" id="choices_choices_5" value="5" name="choices[choices]" class="jqTransformHidden">
</span>
<label for = "choices_choices_5" style = "cursor: pointer;">My awesome test</label>
</li>
Some of you might recognize that the input has been jqTransformed
I was wondering how to click on the label named "My awesome test".
Right now, i do :
$el = $this->getSession()->getPage()->find('css', 'ul li span.jqTransformRadioWrapper a');
$el->click();
But it selects the first element. And i want to select them with their Name (and only) for this example it would be "My awesome test".
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案如下:
Here's the answer :