0

I need help to correct this excerpt. The excerpt is not working right now. I have attached the screen shot here.

//h3[text()='Alert Expiration']/..//table[contains(@class,'vdl-calendar__grid') and contains(@role,'grid')]

enter image description here

2
  • As it stands this question isn't really answerable. Here are some things you might want to consider adding to your question. What do you mean by "The expert is not working right now"? What about it isn't working? What are you trying to do? What have you tried? What specific problem or error are you seeing? For more tips on asking, read this page. Good luck!
    – mrfreester
    Dec 5, 2017 at 20:02
  • That being said, if you're trying to put in a date, just sendKeys to the date field, and don't use the datepicker ui for automation. Unless you're specifically testing datepicker functionality, just have your automated test do the simplest thing, and put the date into the MM/DD/YYYY year field with sendKeys
    – mrfreester
    Dec 5, 2017 at 20:06

1 Answer 1

1

Looks like you have a problem to get the right identifier for the object.

You can use following xpath:

//div[@class="alert-expiration"]/descendant::div[contains(@class,"vld-date-time-picker")]/descendant::table

construction with descendants would be more stable.

Not the answer you're looking for? Browse other questions tagged or ask your own question.