I tried to automate a scenario, where the condition is that I have to select an option from drop down and then there's another dropown next to it, I have to click one option from next drop to enable to button . I tried with the code but it clicks only the first option,.And showing error as stale Element reference:element is not attached to the page document. Please help. Please let me know if in not very clear.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
When you select
Insurance Test Client
then only you get the optionProduct Insurance
, which essentially means the HTML DOM gets changed, which results inStaleElementException
. To avoid that, once we select from the first dropdown, we need to induce somewait
for the elements of the second dropdown to render in theHTML DOM
. Then we will useSelect
Class to select an option. Try out the following code block: