Element mit XPath @id ermitteln wenn nur ein teil der id bekannt ist

wiegia086

Mitglied
Hallo,

ich möchte mit XPath auf ein element per @id in einem automatisierten test zugreifen. Jedoch kann ich kann ich nicht die ganze id verwenden weil diese teilweise automatisch generiert wird.

Kann ich mit Xpath @id auch nur nach einem teil der id suchen?

z.b.:
Ganze Id:
//tbody[@id='webacForm:j_id66:0:activeProducts:tbody_element']/tr/td[1]

ich kann aber erst ab activeProducts garantieren dass die id gleich ist:

Daher möchte ich folgend suchen:
Teil der ID:
//tbody[@id='activeProducts:tbody_element']/tr/td[1]

Gibt es von Xpath einen anderen Befehl den ich verwendet könnte?
oder wie kann ich mein Problem sonst umgehen?

Vielen Dank im Vorraus.

lg Andreas
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
T Xpath & JDOM Element Pfad ausgeben XML & JSON 2
L Element manipulieren in einem DOMResult per XPath XML & JSON 10
X Xpath, alle Element die mit "user" beginnen auswäh XML & JSON 2
M JDOM und XPath, zu Element zugehörigen XPath-Ausdruck XML & JSON 5
8u3631984 jaxb XML Mapper - Root Element mit Attribut XML & JSON 20
B DOMParser - Element filtern XML & JSON 1
N jdom2 - Referenz auf Nested Element XML & JSON 2
H XML Element `Class` wird nicht gelesen XML & JSON 2
F xml Element ersetzen XML & JSON 5
M Text eines Elements in XML Datei mit JAVA bearbeiten und kompletten Element-Zweig hinzufügen XML & JSON 16
W XML-Element komplett löschen XML & JSON 5
L XML nur ein Element einlesen XML & JSON 2
R XSD in einer choice mehrmals das selbe element möglich XML & JSON 5
S JDom XML ein Element hinzufügen. XML & JSON 1
ARadauer xsd ref auf element oder typen verwenden? XML & JSON 2
R cvc-complex-type.3.2.2: Attribute 'uuid' is not allowed to appear in element 'jasperReport'. XML & JSON 4
F EMF, XSD to ECore mapping, Attribute vs. Element XML & JSON 2
C xml validierung gegen xsd mit jdom: Fehlermeldung Cannot find the declaration of element ... XML & JSON 8
Landei JAXB: Wert von übergeordneten Element XML & JSON 4
N Alle namespaces ins Root Element hinauf ziehen XML & JSON 2
N Alle namespaces ins Root Element hinauf ziehen XML & JSON 2
S Validierung mit JAXB2 ohne root-element XML & JSON 10
E xml Element sortieren XML & JSON 2
Z XML parsen - Element mit Werten XML & JSON 2
enne87 Element-Werte werden falsch ausgelesen XML & JSON 2
M XSD - Child Element möglich, aber nicht zwingend erforderlich XML & JSON 6
N Individuelles Wrapper-Element um Collection mit JAXB XML & JSON 6
R Element - Ausgeben von Kommentar XML & JSON 4
G mit Transformer.transform ein Element überschreiben XML & JSON 2
G XSL: Element über eine Variable ermitteln XML & JSON 4
sparrow JDom Element.getChild("Name") liefert null obwohl vorhanden XML & JSON 4
B XML-Element als String ausgeben XML & JSON 5
L Element einlesen <Telefon name="Karl">134313 XML & JSON 2
S Cannot find the declaration of element XML & JSON 2
M Jaxb Annotationen, Wert als XML Element XML & JSON 2
O XML Element mit ":" im Namen XML & JSON 23
G Element mit Text und Unterelement XML & JSON 2
S Ampersand im Jdom-Element XML & JSON 2
C jdom.Element nicht vorhanden? XML & JSON 4
W JDOM element ändern funzt nich :( [problem gelöst] XML & JSON 3
M XML einlesen - prüfen ob Element vorhanden XML & JSON 2
F choice-Element mit minOccurs=0" XML & JSON 11
C Mehrere Element_Nodes zusammenfassen zu einem Element XML & JSON 9
K Auf bestimmtes Element im XML zugreifen XML & JSON 3
H Adapter: String->Element bzw. Element->String XML & JSON 6
M JDOM Element ohne Inhalt kopieren ? XML & JSON 3
S String in element casten XML & JSON 2
S Element hinzufügen XML & JSON 2
B Element an bestimmter Stelle einfügen (JDOM) XML & JSON 8
S zum element Attribut xmlns zufügen XML & JSON 6
N bestimmtes Element auslesen - ich verzweifel XML & JSON 3
J [Newbie] [JDOM] Element aus XML entfernen klappt nicht XML & JSON 4
P [Solved] XSL: Element-Variable auslesen XML & JSON 2
Noar XSLT - Element-Wrapping XML & JSON 2
R JDOM Root-Element entfernen aber Rest behalten XML & JSON 10
S Element addContent(Element) gibts nicht XML & JSON 5
R node.getNodeValue() bringt mir komplettes CDATA-Element XML & JSON 3
W Element Liste in Root XML & JSON 5
D Text, String vor einem Root Element einfügen XML & JSON 2
W root element parsen,Hilfe! XML & JSON 5
E Element.setTextContent(String); Ersatz fuer Version 1.4? XML & JSON 3
A NullPointerException bei leerem Element XML & JSON 4
D XML: Element section content does not follow the DTD XML & JSON 6
clemson element mit id in jdom löschen XML & JSON 2
A Element an einer bestimmten Stelle einfügen (nicht am Ende) XML & JSON 4
R JDom: XML Code von Element, und: ist Element ein standalone XML & JSON 2
Kirby.exe Probleme mit XML XPATH Select XML & JSON 3
B XPath soll XML liefern XML & JSON 7
O XPATH Problem - Anfänger XML & JSON 4
M dom4j unberechtigte Invalid XPath expression XML & JSON 12
W XPath schreiben XML & JSON 1
P HTML XPath XML & JSON 1
S Ersatz für die veraltete Klasse XPath XML & JSON 1
C XPath: Alle Kinder in einer Schleife auslesen XML & JSON 2
P Xpath zugriff auf Attribute XML & JSON 3
P "XPath is deprecated" XML eclipse XML & JSON 3
G HtmlUnit XPath XML & JSON 5
D XPath-Query XML & JSON 2
I XPath Namensräume und auslesen einzelner Knoten XML & JSON 3
AMStyles XPATH Befehl SVG Java XML & JSON 2
G xpath: in Kindelement zwei Attribut-Werte auslesen XML & JSON 2
G xpath: Inhalt eines Kindelements auslesen XML & JSON 2
H ChildNode via XPath ansprechen XML & JSON 2
G JDOM - aus Children-Liste ein Child direkt ansprechen ohne XPath? XML & JSON 9
S Attribute von Elementen auslesen mit XPath XML & JSON 2
W XPath + Inhalt aus <td> XML & JSON 2
R XPath - frage zur Adressierung XML & JSON 3
reibi XPath XML & JSON 14
M xPath liefert leeres Nodeset XML & JSON 2
M Probleme mit XPath bei Java XML & JSON 5
F XPath-Problem mit DOM4J XML & JSON 8
T XPath Problem: finden einer Node nach Attributswert XML & JSON 2
O XPATH gesucht XML & JSON 6
G XPATH-Frage XML & JSON 2
P XPath und Namespaces XML & JSON 3
G XPath - replace function funktioniert nicht XML & JSON 3
E XPATH-Ausdruck mit not XML & JSON 4
E Wieso liefert dieser XPATH-Ausdruck nicht die richtige Anzahl Treffer? XML & JSON 8
M XPath Ausdruck validieren XML & JSON 2
N XPath Adressierung XML & JSON 7

Ähnliche Java Themen

Neue Themen


Oben