From 3e79704b6351431eff25cc6c89cf2ebefc800069 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 18 Apr 2013 17:17:14 +0300 Subject: [PATCH] Do not use generated ids as anchor points for TestBench (#11634) Change-Id: I831af0d72d009405ceed3e201bc135dffb43c8b2 --- client/src/com/vaadin/client/ComponentLocator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 551f7bafcb..af934470c2 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -447,7 +447,10 @@ public class ComponentLocator { return null; } String elementId = w.getElement().getId(); - if (elementId != null && !elementId.isEmpty()) { + if (elementId != null && !elementId.isEmpty() + && !elementId.startsWith("gwt-uid-")) { + // Use PID_S+id if the user has set an id but do not use it for auto + // generated id:s as these might not be consistent return "PID_S" + elementId; } else if (w instanceof VUI) { return ""; -- 2.39.5