How to find out selected date in calendar RRS feed

  • Question

  • User395396 posted

    Hi, I am trying to assert that current date is selected in calendar. I can see in Repl(); that what makes it selected is that it belongs to some "class": "MonthViewItem > CellTextView"

    However I am not able to query for that class. I tried lots of things but none of them works. For example I was expecting this to work but it doesn't it gives empty array: app.Query(x => x.Class("MonthViewItem").Class("CellTextView").Marked("Thursday 09/July/2020"));

    This doesn't work as well: app.Query(x => x.Class("MonthViewItem > CellTextView"));

    Is there an easy way how to get date which selected in calendar?

    Thank you.

    Thursday, July 9, 2020 10:09 AM

All replies

  • User382871 posted

    What control did you use as the picture shown? To get the date, try to use the code like below: var results = app.Query (c => c.Class ("numberPicker").Invoke ());

    Thursday, July 9, 2020 3:27 PM
  • User395396 posted

    thanks for the answer. I did not use any control yet. Picture is only showing tree of current screen (and it is cut), I just wanted to show that date which is selected on screen, is the one which is in "MonthViewItem > CellTextView".

    Can you explain your query a bit? Should I pass something in .Ivoke()? Because it is required to have argument there. What is the "numberPicker"?

    Thank you

    Friday, July 10, 2020 8:47 AM