In base a questo tag HTML, come posso fare clic su Visualizza da TrustedMachines?
So come farlo da document.getElementById
o nome, ma non sono sicuro di come farlo in questi casi
<td>
<a data-auto-test-id="ViewTrustedMachines" href="/WebObjects/support.woa/wo/iKK52GLbH8yXxkrGGvN4M/4.4.5.53.7.5.0.447.0.0.1">View</a>
</td>
Tag più completo:
<tbody>
<tr>
<th>Geo</th>
<td>USA</td>
</tr>
<tr>
<th>Download Queue</th>
<td>0</td>
</tr>
<tr>
<th>Wish List</th>
<td>0</td>
</tr>
<tr>
<th>Something else</th>
<td>
<a data-auto-test-id="ViewSomethingelse" href="/WebObjects/support.woa/wo/iKK52GLbH8yXxkrGGvN4M/4.4.5.15.1.7.0.142.0.0.1">View</a>
</td>
</tr>
<tr>
<th>Trusted Machines</th>
<td>
<a data-auto-test-id="ViewTrustedMachines" href="/WebObjects/support.woa/wo/iKK52GLbH8yXxkrGGvN4M/4.4.5.53.7.5.0.447.0.0.1">View</a>
</td>
</tr>
Ecco il mio normale clic per l'id:
tell application "Safari"
do JavaScript "document.getElementById('ViewTrustedMachines').click();" in tab 1 of window 1
end tell