Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
7 Risposte
8827 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

Hi Jain,

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

Ex:

xpath expr="//div[hasclass('class_name')]"
Avatar
Abbandona
Risposta migliore

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? 

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Risposta migliore

thanks for helps, you can see more

Avatar
Abbandona
Risposta migliore

Hi Jain, Could you solve this issue?

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Risposta migliore

greqat tho

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 22
3823
0
mar 22
4
1
ago 21
3334
3
set 25
3299
0
ago 25
833