How to verify the disabled dates from datepicker in selenium IDE?



  • We are using javascript and the datepicker also contain the aria-disable=ture/false. Can anyone help me how to test either the aria-disabled=ture or false based on the condition. Please help me how to resolve this problem in selenium IDE not in selenium Web driver.



  • You have to use the store attribute command :

    enter image description here

    store attribute command finds the element using CSS locator and gets the attribute value mentioned after the '@' symbol. Then the value is stored to the specified variable in the value field.

    For instance:

    For getting the data-questionid for the below element:

    <div class="question" data-questionid="42375" id="question">
    

    we set target for store attribute as :

    css=div#question@data-questionid
    

    here,

    div#question
    

    is the css locator for a tag with div and id as question, the attribute that we need is mentioned after the @ symbol. In this case we needed data-questionid. In your case it will be aria-disabled

    To validate this you can use the assert command:

    The assert command expects the variable that contains an actual result as the target, and the expected value in the Value field

    Remember, that for all other commands we mention the variable as ${variablename} but for assert we need to use it as variablename



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2