Forum Discussion
6 Replies
- AccedoANZReel Rookie
One further finding we have come across in the meantime re the above is the following
We've discovered that the keyword grabs ALL of the elements that have the attribute "focused" and seems to return the last one it finds
- miketheissReel Rookie
I have also experienced this. In the channel I am testing it is not happening for most items. However, there are some places where the "active" element I get backed from Web driver is not at all what I was expecting or what the user sees as focused.
I have been using a lot of specific element locators in my tests and I'm doing a lot of external parsing of the JSON that comes back from those queries in my assertions as opposed to relying on the "active" element query a lot.
- sudoscienceReel Rookie
Has anyone figured this out? I'm having a similar problem where it only seems to return the last "focused" element and not the one I am expecting and it is only happening for the one app I am testing. I've loaded the sample channels that Roku has in their repos and it seems to work fine there. Other people with the same zip file as me are not running into this issue either
- miketheissReel Rookie
Which version of the framework are you using? There was a bug in the first few versions of the framework (v 1.0 and v 2.0) which caused the original issue reported here. They issued a fix in the v 2.1 release, so if you update to latest I would expect that would fix it for you. I have used up to v 2.2, but have not used v 2.3, which just came out last month.
Release info at the bottom of this page:
https://developer.roku.com/en-ca/docs/developer-program/dev-tools/automated-channel-testing/automated-testing-overview.mdWarning: they fundamentally changed the way that element/elements queries return data in 2.1 and 2.2. I found that queries for nested elements that worked as I would have expected in previous versions did not return matches after updating to 2.1 / 2.2. This was not a clearly documented change. After updating, I had to directly query parent or child elements and do additional parsing in some cases, so if you are using an older version, you may need to update some of your queries after updating, depending on how your queries are written.
- sudoscienceReel Rookie
Oh my god, that was it!! Turns out I was running an old version, updating it fixed the issue. Thank you so much for the quick and detailed response!!!!