跳至内容
菜单
此问题已终结
2 回复
2655 查看

ver. Odoo 16

I want to use below in xpath expr but don't know how to, please help.


regards

形象
丢弃
编写者

i have not yet reference these types of elements yet, so please help, i am stuck.

regards

Try this 

expr = "//div[hasclass('d-flex justify-content-between')]/t[2] position='after'

最佳答案

You should be able to use expr="//t[contains(@t-value, '/shop/checkout?express=1')]"​, your code wasn't working because the t-value field contains '/web/login?redirect=/shop/checkout' if redirect_to_sign_in else '/shop/checkout?express=1'​, not just the part you were trying to match on (ie. at the moment the xpath is being handled, it's still looking at that entire value as just a literal string.)

形象
丢弃
编写者

thanks @Sibert Aerts for your reply.

will check this and confirm.

regards

编写者

@Sibert Aerts, this is not throwing error while Upgrading module through UI, but its not opening page and not showing any error. is there anything else should be here to actually execute / show page on this url '/shop/checkout?express=1' ?

regards

最佳答案

You can use 

expr="//t[@t-set='redirect_url']"
形象
丢弃
编写者

hv tried earlier, throws error on Upgrade module... if there is missing part in your code, please mention...

regards

相关帖文 回复 查看 活动
2
4月 24
4604
1
4月 24
3132
4
6月 23
3657
1
5月 23
3905
1
4月 20
7733