Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
7 Odpowiedzi
8921 Widoki

I want to remove some fields from website billing information.in order to do that i have a div and its t-attf-class i want to xpath it

Awatar
Odrzuć
Najlepsza odpowiedź

Hi Jain,

You can use hasclass() function in XML in the xpath.

Ex:

xpath expr="//div[hasclass('class_name')]"
Awatar
Odrzuć
Najlepsza odpowiedź

Since I'm targeting a t-attf-class (which is dynamically generated), does the XPath execute before or after the classes are fully rendered in the DOM? Does this distinction affect how I should write the xpath expr? 

Awatar
Odrzuć
Najlepsza odpowiedź

Thanks for sharing https://www.mycfavisit.blog

Awatar
Odrzuć
Najlepsza odpowiedź

thanks for helps, you can see more

Awatar
Odrzuć
Najlepsza odpowiedź

Hi Jain, Could you solve this issue?

Awatar
Odrzuć
Najlepsza odpowiedź

Hi Jain,

There could be many other ways but the best way I found to do this is using relative xpath as in here:
 https://stackoverflow.com/questions/50716507/how-to-give-odoo-xpath-in-t-attf-id 

The ideas is to target the block after the div (be it a field or an input, etc...) then add /..  at the end of the xpath expression get the parent block in this case the div container.


If this is not what you are looking for, can you share a code or its structure for better response? 

Cheers

Awatar
Odrzuć
Najlepsza odpowiedź

greqat tho

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
kwi 22
3863
0
mar 22
4
1
sie 21
3368
3
wrz 25
3337
0
sie 25
859