[wtr-general] Re: Elements - Multiple locators for same element

2019-12-04 Thread Aionitoaie Andrei
Thanks, I was looking something more like OR evaluation. luni, 2 decembrie 2019, 22:38:45 UTC+2, Titus Fortner a scris: > > Watir allows you to locate elements with multiple locators with an implied > "AND" it does not support multiple locators with an "OR" evaluation. > > What is supported is

Re: [wtr-general] Re: Elements - Multiple locators for same element

2019-12-04 Thread Titus Fortner
Right, I'm not a big fan of that pattern, as it makes executing deterministic tests more challenging. If you want to use it to apply to multiple views like mobile/desktop, you're going to introduce race conditions. If you want to use it to minimize brittleness you run the risk of testing the wrong

Re: [wtr-general] Re: Elements - Multiple locators for same element

2019-12-04 Thread Justin Ko
Hi Andrei, Do you have an example of where an OR evaluation is useful? As Titus said, it's not usually the way to go. That said, I'm pretty sure I've done it before. The solution usually depends on what you are trying to do and the page. For example: - If you wanted to match elements with