Kategorien
Allgemein

Getting rid of Google Web Toolkit’s x-auto id

When creating automated UI tests for an application that is build with the Google Web Toolkit (GWT), it can be quite annoying to have to deal with the HTML IDs the framework automatically generates. Those usually start with x-auto-, followed by a number.

To remove all automatically generated IDs, open the browser dev tools and run the following snippet in the console:

document.querySelectorAll('*[id^=\'x-auto-\']').forEach(e=>e.removeAttribute('id'));

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.