0

I'm struggling with a really fussy piece of js in a page I need to test using Sahi. The problematic piece is a calendar which pops up when entering a date field for a particular item, and I can't just click the text box and then click on a date I retrieve/create, as there's an auto-increment happening, e.g. 4 becomes 4[1], 4[2] etc. etc.

The ID of the table which pops up when you try and enter a date is also dynamic, so is there a way for me to retrieve the tableId of this table using _parentTable? I'd like to at least try and ID the table and then try something else to click on the date I need.

Thanks, Jason

1 Answers1

0

You use _parentTable to find an element relative to another element in the same table. In your example, you say you have a number of indexed "4" links; perhaps in a popup, 12 month calendar? Maybe you want to click on December 4th, which is in an dynamic, indexed table that includes the bold text "December". In this case, you should be able to do this:

_click(_link("4", _in(_parentTable(_bold("December")))));
Brine
  • 3,733
  • 1
  • 21
  • 38