I have been attempting to automate a web page (help desk form) in PowerShell with the Selenium module. I can get all different types of elements except dropdowns. I have inconsistently been able to get some of them by doing a Find-SEElement and using the -xPath, performing a click() and then doing a Find-SEElement again on the resultant drop down list, but this does not
always work. The one I am working on at the moment looks like this:
I can confirm that I do find the element, but if I try to do anything except click on it I get the "element is not interactable" error. I was reading through some other forums, and someone suggested doing something like this:
When I run this, however, I get the error “Element should have been select but was td”. Googling this I have seen a number of threads and solutions for other languages such as Python and C#, but nothing specific to PowerShell. I am just looking for a consistent syntax to be able to grab a dropdown menu and select an item from the resultant list.
Edit: I did realize that the element is a /td, not a select, after posting, based on the XPath. The question remains, however, how to consistently grab the dropdown menu and then select a value. I have done it like this (different element name but shows same issue):
hey, did you ever get a response on how to automate selecting a dropdown menu on a webpage and also filling in text boxes? I’m trying to figure out how to automate those entries. Any tips would be helpful. Thank you in advance.
Please do not hijack other peoples threads. If you have the same or a similar issue create a new question for yourself and place a link to the thread you wnat to refer to in your question.
I will close here now since the thread has been unanswered for 4 years now and the OP has been seen last more than 2 years ago.