Open Bisllly opened 1 year ago
The index in XPath is one-based, meaning the first element has an index of 1, the second has an index of 2, and so on.
In the XPath //table/tr[1]/td[4], tr[1] means the first row, and td[4] means the fourth cell in that row.
//table/tr[1]/td[4]
if replacing 4 number is last() we have the last item in the list.
4
last()
//table/tr[1]/td[last()]
Refer: Predicates
@binzunu1909 @Bisllly
Tham khảo thêm
The index in XPath is one-based, meaning the first element has an index of 1, the second has an index of 2, and so on.
In the XPath //table/tr[1]/td[4], tr[1] means the first row, and td[4] means the fourth cell in that row.