etaoin

mmer 2024-02-09T12:10:35.459389Z

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

mmer 2024-02-09T13:39:36.610429Z

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.

lread 2024-02-09T13:48:32.307299Z

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

mmer 2024-02-09T13:50:47.653479Z

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

mmer 2024-02-09T13:51:25.711879Z

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

mmer 2024-02-09T13:53:11.203939Z

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

mmer 2024-02-09T13:53:49.197569Z

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

lread 2024-02-09T14:01:40.323349Z

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

mmer 2024-02-09T14:04:12.119809Z

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

lread 2024-02-09T15:06:12.678789Z

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?

mmer 2024-02-09T15:11:25.533489Z

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.

lread 2024-02-09T15:38:41.788299Z

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".

lread 2024-02-09T15:39:18.001129Z

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

mmer 2024-02-09T15:43:28.008759Z

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

1