Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2840 Lượt xem

ver. Odoo 16

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


regards

Ảnh đại diện
Huỷ bỏ
Tác giả

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'

Câu trả lời hay nhất

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.)

Ảnh đại diện
Huỷ bỏ
Tác giả

thanks @Sibert Aerts for your reply.

will check this and confirm.

regards

Tác giả

@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

Câu trả lời hay nhất

You can use 

expr="//t[@t-set='redirect_url']"
Ảnh đại diện
Huỷ bỏ
Tác giả

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

regards

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 4 24
4762
1
thg 4 24
3329
4
thg 6 23
3909
1
thg 5 23
4012
1
thg 4 20
7827