how I concat following two xpath and make a one xpath

时间:2016-04-07 10:30:44

标签: selenium xpath

I have two xpath

  1. for select day: .//*[@id='calendar']//*[contains(@class,'fc-first fc-last')]/td[4]

  2. for select time slot: .//*[@id='calendar']//*[contains(@class,'fc-agenda-slots')]/tbody/tr[3]/td

I need to concat both xpath and create a one and have to access a calendar slot with date & time.

enter image description here

I have attached my code in image format.

1 个答案:

答案 0 :(得分:0)

You can use | (union operator)

.//*[@id='calendar']//*[contains(@class,'fc-first fc-last')]/td[4]|.//*[@id='calendar']//*[contains(@class,'fc-agenda-slots')]/tbody/tr[3]/td