Ich versuche, einen Griff auf die Schaltfläche unten basierend auf dem Attribut gl-command
. Ich bin mir bewusst, dass ich den Button mit einem Cssselector
Locator finden kann, aber das möchte ich in diesem Fall nicht tun.Selen-Webdriver (C#) - Finding-Taste basierend auf Attribut
Ich möchte darauf hinweisen, dass dies nur eine von vielen Tasten innerhalb der AUT ist: <google-componentbutton size="32"></google-componentbutton>
<div class="gl-component-buttons"><gl-component-buttons id="gl-component-button-set-bottom">
<google-componentbutton size="32">
<button class="google-componentbutton glmdl-button glmdl-js-button glmdl-js-ripple-effect google-image gl-transaction-image" style="height: 32px; widgl: 32px; background-size: 24px 24px; background-position: 4px 4px;" gl-tooltip-id="google_component_transaction" gl-tooltip="transaction" data-upgraded=",MaterialButton,MaterialRipple" gl-command="transaction">
<span class="glmdl-button__ripple-container">
<span class="glmdl-ripple"></span>
</span>
</button>
</google-componentbutton>
... oder '// button [@ gl-command = 'transaction']' –