Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odgovori
5171 Prikazi

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
Opusti
Best Answer

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

Avatar
Opusti
Best Answer

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

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

Avatar
Opusti
Best Answer

You can try this expr

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

Avatar
Opusti
Avtor

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

can you share your code ?

Related Posts Odgovori Prikazi Aktivnost
1
apr. 22
6636
3
apr. 21
8357
2
jun. 20
5609
1
okt. 19
4582
1
mar. 15
13787