What are we going to achieve here with Robot Framework? Could you please explain?
could you please repeat the question. and those id will keep changing. please find more stable element.
Hi ,
My query is simple.i am not concerned about output.
below code:
String res=cd.findElement(By.cssSelector("*[id^='p_13838465-']"));
System.out.print(res);
ideally this command should return 1 value ( 1st value being matched) . but i m getting list of values.
say we have 10 items with xpath "*[id^='p_13838465-']"). I am using find element ..it should give 1 st value ..why it is giving all values ..
isn't it contradictory?
it seems like "[id^='p_13838465-']" is very common part of id.
what is the full path?
"[id^='p_13838465-results']/li[1]/a"
I am not concerned about full path.
My query is for the path i gave , I should get 1 value.
Why i m getting list of values as I m using find element not find elements
[quote="Sheenam":2te9oitg]
My query is for the path i gave , I should get 1 value.
[/quote:2te9oitg]
you're not getting 1 value because id is common with all the list. to fix it give a full path.