The first click opens the select box, but the second click always fails.
My thougt was that i have to first click on the select to open it, second click on Option 3
I can see that the select is clicked, because it opens up.
I trid the forec=true in click
The Error i am getting is:
Error: locator.click: Element is not visible
=========================== logs ===========================
waiting for locator(āxpath=//html/body/select/option[3]ā)
locator resolved to option value=ā1ā 1 /option
attempting click action
waiting for element to be visible, enabled and stable
forcing action
element is visible, enabled and stable
scrolling into view if needed
I also tried to set the focus on the Option.
But I always get the āElement is not visibleā Error.
I have no clue what the problem is.
Thanks
Hi Dave,
if i try
Select Options By xpath=//select index 3
nothing happens.
I would expect that option 3 gets selected but nothing.
Maybe i donāt understand Select Option By.
Just read the Documentation there it says:
Returns list of options which keyword was able to select. The type of list item matches to attribute definition. Example if attribute equals to label returned list contains label values. Or in case of index it contains list of selected indexes.<
If you donāt want to use Select Option By, try this approach:
Click Element //*[@value=ā3ā]
If that works, I recommend using a variable to make it more reusable.
For example:
Click Element //*[@value=ā${variable}ā]
Another option could be by text:
Click Element //*[text(),ā${variable}ā]