Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
4830 Weergaven

Hello,

I am using Odoo15, and I am trying to access the text content in the following XML code :



I have tried using //div/text() and also //div[contains(text(), 'On hand: ')] but that did not work. Can anyone help me?


Avatar
Annuleer
Beste antwoord

If you need to change the On hand string, try replacing the entire div

Avatar
Annuleer
Beste antwoord

xpath locating by text() (contents) breaks in translated context.

So you'll get the error "element cannot be located in the parent view".

Avatar
Annuleer
Beste antwoord

You can try this expr

expr="//*[text()='On hand: ']"

Avatar
Annuleer
Auteur

I get the following error when accessing the view :
" the element cannot be located in the parent view "

can you share your code ?

Gerelateerde posts Antwoorden Weergaven Activiteit
1
apr. 22
6005
3
apr. 21
7784
2
jun. 20
5177
1
okt. 19
4233
1
mrt. 15
13373