Skip to Content
Menu
This question has been flagged
3 Replies
5196 Rodiniai

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?


Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
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".

Portretas
Atmesti
Best Answer

You can try this expr

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

Portretas
Atmesti
Autorius

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 Replies Rodiniai Veikla
1
bal. 22
6645
3
bal. 21
8369
2
birž. 20
5639
1
spal. 19
4597
1
kov. 15
13810