Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
146
rated 0 times [  152] [ 6]  / answers: 1 / hits: 24928  / 10 Years ago, thu, december 11, 2014, 12:00:00
<div class=base-view app-loaded data-ng-class=cssClass.appState>
<div class=ng-scope data-ng-view=>
<div class=ng-scope data-ng-include='partial/navigation/navigation.tpl.html'>
<div class=feedback-ball feedback-ball-show feedback-ball-big data-ng-class=feedback.cls data-ng-click=outside($event) data-feedback-ball=>
<span class=close-button></span>
<h2 class=ng-binding>Welcome to Garbo</h2>
<div class=ng-scope ng-binding data-ng-bind-html=feedback.html data-ng-if=feedback.html>
<p>Here you can play in style in a safe and secure environment.</p>
<p>
<a class=btn href=/account>My Account</a>
<a class=btn href=/deposit>Deposit</a>
</p>
</div>
</div>
</div>


I want to find and click /account button inside data-ng-bind-html=feedback.html, I can find data-ng-bind-html=feedback.html but I could not find account button inside it. when I try to find account button, it gives me error that page has multiple account button so be more specific.



I tried element.().element() but it didnt work, please help


More From » angularjs

 Answers
185

element calls can be chained to find elements inside other elements, so your element().element() solution should work.



Alternatively, you can construct an xpath expression to reach the link inside the appropriate div:



element(by.xpath('//div[@data-ng-bind-html = feedback.html]//a[@href = /account]'))

[#68514] Tuesday, December 9, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
amari

Total Points: 736
Total Questions: 111
Total Answers: 90

Location: Saint Pierre and Miquelon
Member since Fri, Jan 28, 2022
2 Years ago
;