Fork me on GitHub
#etaoin
<
2024-02-09
mmer12:02:35

Hi, I might be missing something, but how do I select an input that is a radio button?

mmer13:02:36

To add further context. I am being told the radio button is not clickable because the click is going to another div. Is there a way to overcome this? The radio button is on a modal dialog.

lread13:02:32

@U4C3ZU6KX you have not responded to my answers to your other questions above yet. Did they help?

mmer13:02:47

I moved on ( tried latest version etc - I only have ssh access no x is available on those nodes.) so hence my question here .

mmer13:02:25

This is the error I am seeing ":message "element click intercepted:"

mmer13:02:11

Is there a way of focusing on an element then clicking it? I.e. find it and then click it.

mmer13:02:49

If I use (e/exists? driver {:tag :input :id "id4"}) it return true. So I don't know why I can't click it.

lread14:02:40

could be some element is overlapping it, which could be temporary, did you try introducing a wait?

mmer14:02:12

Nothing it is the modal that is getting the clock because of wrapping in divs.

lread15:02:12

What I meant was a div might be on top of the radio button while the dialog is being constructed (maybe by some javascript). Did you try a wait?

mmer15:02:25

The issue is that rather than using a simple radio button - they have mashed the view with divs and spans in order to make it "look good", Clicking on a label seems to work. Thanks for you efforts.

lread15:02:41

You are welcome! It can sometimes be tricky to simulate some user interaction with the complexities of webdrivers, browsers, and web pages themselves. Since etaoin is a thin wrapper over webdriver, you can often find solutions/ideas by searching the web for what you are trying to do or are stuck on. Ex. googling for "webdriver element click intercepted".

lread15:02:18

Also, I find inspecting the dom in the browser is often helpful.

mmer15:02:28

That was how I solved it, what was wrong with normal html

simple_smile 1