Is there a way to fill in fields that aren't inside a form tag and click on elements that aren't links? #598
Replies: 3 comments
-
Hi @randall-coding, thanks for asking this question. I'll try to help. Can you provide an HTML snippet that demonstrates the form and fields that you're operating on? I've found that grounding the discussion in a concrete example is usually very helpful. I'll take some guesses at what you're working with ... input field not inside a form tagWithout more information, I suspect what you're seeing is an If that's right, then the underlying issue is that Mechanize hasn't been kept up-to-date with the HTML5 spec (which has been constantly changing over the past 10+ years). If you peek at click on an element that's not a linkThis one is a bit stranger -- I would like to understand your specific use case more deeply. You can try to do this by using But it seems more likely that the page you're working with relies on Javascript to make an element clickable in the browser, and/or traps the click event to trigger a Javascript callback. Mechanize isn't a full browser, and it doesn't attempt to do anything with Javascript that a browser might normally load. If this is what you're dealing with, you may want to use a tool that will leverage actual browser functionality, like Let me know if anything here is helpful, or if I've made incorrect assumptions. |
Beta Was this translation helpful? Give feedback.
-
I've created #592 to track missing HTML5 functionality. |
Beta Was this translation helpful? Give feedback.
-
@flavorjones Thanks for the response. Yes it turns out the page is using javascript and in fact angular. I ended up switching over to Selenium. |
Beta Was this translation helpful? Give feedback.
-
From reading the docs, it seems that in order to fill in the value of an input field that field must be inside a form tag and to click on an element that element needs to be a link.
In my current use case I need to break both of those rules, the input field is not in a form and the element to click on is not a link. Any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions