How to handle auto Suggestive drop downs using testrigor

87 Views Asked by At

I am new to Testrigor, Please let me know to achieve below tasks.

1.how to handle auto suggestive dropdowns using testrigor.(Type some text and pick the names suggested by it)

2.How to wait till spinner/Hourglass is disappeared.

3.How to handle Ajax

URL : https://opensource-demo.orangehrmlive.com/web/index.php/dashboard/index

Steps:- Login Click admin Click Add Select Userrole Type some text and it will come up with suggestion with employename and i need to select that name (I have tried sending the full name ,but its failing)

1

There are 1 best solutions below

1
KevinMCarroll On
  1. In most cases, just partially type the name you want to select into the input. Your best bet would be the following:

    click "suggestiveDropdown"
    type "partialName"
    click "completeName"

  2. testRigor waits by default for 30 sec. If your loading spinner is prone to take longer than that or if you have content that loads before the loading spinner disappears (which can cause a click on a disabled element), you can (a) have testRigor wait on a loop case by case (assuming you know what the loading spinner is called), or (b) you can add the loading spinner to your settings, which should affect all cases and should force testRigor to wait for it without any explicit steps.

  • (a) A loop for waiting would look like this:
    wait 3 sec up to 20 times until page does not contain "loadingSpinner"

Then you can add this step as a reusable rule called "handle loading spinner".

  • (b) In Settings > Advanced > Loading spinner selector: , you can add the selector for your loading spinner. You should not need to add any steps to your case if the selector is correct and not in the dom after the page is done loading.`
  1. testRigor handles Ajax implicitly. The focus is on the front-end, so by interacting with the page, the browser should perform just as it would with a human user. That said, if there is a need to access some backend info, you can perform an API call using the "call API" functionality at https://testrigor.com/docs/language#apis