New answers tagged

0

<div class="input group"> <input id="end_time"></input> <span class="input-group-btn"> <button class="btn btn-default"> <i class="fa fa-clock"></i> </button> <span> </div> You would want to use the following selector for the ...


0

Angular, Protractor: If you have any class or Id it would be easy like this: element(by.cssContainingText('.anyClass', 'Log Out'));


1

https://developer.mozilla.org/en-US/docs/Web/XPath/Functions Browser supports only XPATH version 1.0 and matches is an XPATH 2.0 method, and so you can use only xpath 1.0 in selenium. The above linked document shows the supported XPATH methods. so in your case //mat-option/span[text()="someting" or text()="something" and so on ] //mat-...


1

You can use //mat-option/span[condition1 or condition2 or condition3] With XPath 2.0 or higher you could also use //mat-option/span[matches(., 'aaa|bbb|ccc')] But sadly the developers of Selenium are still stuck on XPath 1.0. Are you sure you want "text()" here rather than "."? With text(), the text must all be in one text node: no ...


Top 50 recent answers are included