Skip to content
Advertisement

How to use the WebDriverWait() to access the value of the next element having the same class names in selenium python

I am trying to access the values of both the fields Year and Quarter from this particular site. With the help from one member of StackOverflow, I was able to implement the code for the year part, now if I want to access the quarter part so how can I access the same.

Below is the implementation so far.

JavaScript

Any hints and suggestions are welcome.

Advertisement

Answer

You have same structure for both years and quarters. One with selectPublicYear and another with selectPublicQuarter class

JavaScript

You can add method to select dropdown by value:

JavaScript

Call method:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement