nam
November 28, 2018, 9:26am
1
Hello all,
This Xpath changing each runtime
Old Xpath : //label[@id=‘tabscontent:tabView:BWconent_0:treeLeft_0:1:j_idt619’)]
New Xpath: //label[@id=‘tabscontent:tabView:BWconent_0:treeLeft_0:1:j_idt484’)]
Help me to set Dynamic Xpath From 619 to 484 …
Set Absolute Xpath for Allthing , even though 619 , 484 … so on
Xpath alway right any runtime
Thanks
Solution : From Hansen
484.jpg
Xpath Relative.jpg
Run OK.jpg
nam
November 28, 2018, 10:05am
2
How to use it : Set Dynamic Xpath
Anyone Know help
Thanks
you could try to use contains in xpath if there is no other object beside that one.
example:
xpath: //label[contains(@id,'tabscontent :tabView:BWconent_0:treeLeft_0:1:j_idt’)]
nam
November 29, 2018, 4:11am
4
Hi William ,
There are 2 Object like that :
[Contains] : Unavalible
Need in help
Thank
2Object.jpg
Hi Nam,
I am wondering which element do you want to get…
If it’s the first label, you can try by using
xpath: //label[contains(@id,'tabscontent :tabView:BWconent_0:treeLeft_0:1:j_idt’)]
I believe that Katalon takes the first element found, but if it does not work, you can specify which label you want to take.
example:
xpath: (//label[contains(@id,'tabscontent :tabView:BWconent_0:treeLeft_0:1:j_idt’)])[INDEX]
or if you want to get it by text, this xpath also works…
xpath: //label[normalize-space(text()) = “DLL”]
Regards,
Hansen
nam
November 30, 2018, 10:47am
6
Hello Hansen ,
I want to get Fisrt Elenment
You are very kind of help . Your tip perfect
Using : Xpath Relative ( 2nd row in Object Path )
//div[@id=‘tabscontent:tabView:BWconent_0:treeLeft_0:3:NodetreeLeft_0_’]/div/label
My job is Successful
( See Image for Solution )
I would like to thank you so much !!!
Your Idea help me Solve it