Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Binding keys to elements whose id is unpredictable and which have no name?

$
0
0

Hello all,

 

I am working on a relatively simple project and could use a little help.

 

I'm trying to use HotKeySet to bind keys to the different buttons on web-based multiple choice question form. Currently I am using the mouse to click my answer choice and the submit button and it's getting really tiresome (I'm doing thousands of these questions). Ordinarily, I would just use _IEGetObjectbyId, but as you can see below the answer choices do not have predictable ids nor a name to reference. My first thought was to reference them by the order in which they appear on the page as they have a constant div class. Is there a way to do that? Please see the attachment for a screenshot.

 

Element Inspector:

 

Answer choice A:

<div class="answer amplifire-question-answer-ct x-component" id=x-auto-64">

 

Answer choice B:

<div class="answer amplifire-question-answer-ct x-component" id=x-auto-68">

 

Answer choice C:

<div class="answer amplifire-question-answer-ct x-component" id=x-auto-72">

 

Thanks!

 

-Fred

 

Autoit screenshot.jpg


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>