Forum Discussion
Thanks for the reply Colin.
'WebApp' is actually part of the name map, and just refers to the actual web page. So I am then looking within the page for the drop down options. The drop down options I'm looking for are at the top of the DOM so that's why I limited the tree level to 2. The openDropdown is a separate function and this part works fine. The drop down options only appear in the DOM once the drop down is expanded. So I essentially am searching within the page for the element that contains the drop down options, which gets passed into a variable of the type object. This part seems to work as when I debug through the script I can see the variable has a object assigned to it. Manually looking through the object I can find the values I am expecting, so I know its found the correct element in the DOM. So once I have found the drop down options element and assigned it to the variable 'DropdownOptions', I then want to search this variable object using the QuerySelector funciton, which should find the individual drop down option I'm looking for.
The issue with all of this really is that it was working. I'm not sure if the QuerySelector function is a little unreliable, or the element isn't being stored properly in the object variable, so I then can't find what I'm looking for.
Ah right.
OK. I think I misinterpreted part of that slightly.
So DropdownOptions contains the top level DIV. But the QuerySelector, when applied to it, does not find the selection you want?
In which case, I'm out of answers at this point I'm afraid. QuerySelector is not a method I've used personally (in TC) so I know nothing about it. I have used CSS Selectors with Selenium Python bindings before, but only within Selenium world and I'm pretty rubbish with CSS notation so had to get a chunk of help from the devs. Your notation looks about right to me, but then, as I say, I'm pretty rubbish with CSS notation! :smileyembarrassed: