I am not expert in javascript, so, excuse my lack of knowledge.
I am trying to interact with an image on a page on the web, to create some automation.
I need to click on that image using javascript, from a script.
I did everything to discover how to access that image and no success at all. The image is not responding to anything. I suppose I am not reaching the right object.
Trying to discover the object, I created a very simple script, that will scale every image on that page, to see at least if I can reach all img object.
This is the script
for (i=0;i<=100;i++) {
document.image[i].width.value = '300';
}
No changes at all.
Is the script correct? is that anything that may be preventing the image to respond from external scripts?
Any clues? thanks.
___ EDIT
the image I need to click is declared like this:
<div class="leaderboard-text">
<span id="addon-add-language-button"><image class="ajaxListAddButtonEnabled" listId="localizationList" src="/itc/images/blue-add-language-button.png"><image class="ajaxListAddButtonDisabled" listId="localizationList" style="display:none;" src="/itc/images/blue-add-language-button-disabled.png"></span>
</div>
You missed an ‘s’ in images and some other things.
but if the image has an id you could do:
to click your image where ‘id’ is the id you are using