Scenario audit _2 pages only

Hello,

I used selenium builder to record multiple pages and export it to JSON. But when I run the audit, Asqatasun gives report only for first 2 pages.

Can anyone suggest whether I am doing something wrong or it will only validate 2 pages scenario?

Regards
Priya

Hello @badhiyanpriya

Could you replay your scenario locally, outside of any Asqatasun stuff, to see whether everything’s OK ? (typically how many pages does it cover)

The idea is to verify that your scenario actually does what you think it does :slight_smile:

Matthieu

Hello,

I have no means to check total number of pages but checking1 by 1 using Axe tool. Do we know how many pages can we test in 1 scenario?

Regards
Priya

Hello @badhiyanpriya,

Tested on more than 2500 pages in 1 scenario only.
The only limits are:

  • json file size (maximum 2 MB, tomcat server configuration)
  • URLs with a routing hashtag

See the topic in French on this issue: Problème d'audit avec les URL du type /#/ (Angular, ...)

Can you show us your JSON file?

Below is JSON file:

{
  "type": "script",
  "seleniumVersion": "2",
  "formatVersion": 2,
  "steps": [
    {
      "type": "get",
      "url": "https://private.(...).com/"
    },
    {
      "type": "setElementText",
      "locator": {
        "type": "id",
        "value": "destinationCity"
      },
      "text": "bos"
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "id",
        "value": "departureDate"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "link text",
        "value": "24"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "link text",
        "value": "31"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "id",
        "value": "findFlightsSubmit"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "css selector",
        "value": "div.frmTxtHldr.flightCabinClass"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "xpath",
        "value": "//table[@id='fareRowContainer_2']//div[.='  Delta Comfort+®  (W)     ']"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "xpath",
        "value": "//table[@id='fareRowContainer_2']//div[.='  Delta Comfort+®  (W)     ']"
      }
    },
    {
      "type": "storeCurrentUrl",
      "variable": "tanaguru-Result_detailed_view"
    }
  ],
  "data": {
    "configs": {},
    "source": "none"
  },
  "inputs": [],
  "timeoutSeconds": 60
}

Hello,

For below new file I got only 1 result. It should have 3. Am I doing anything wrong here?

{
  "type": "script",
  "seleniumVersion": "2",
  "formatVersion": 2,
  "steps": [
    {
      "type": "get",
      "url": "https://www.delta.com/"
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "link text",
        "value": "GIFT CARDS"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "id",
        "value": "recipient_name_0"
      }
    },
    {
      "type": "setElementText",
      "locator": {
        "type": "id",
        "value": "recipient_name_0"
      },
      "text": "priya"
    },
    {
      "type": "setElementText",
      "locator": {
        "type": "id",
        "value": "sender_name_0"
      },
      "text": "badhiyan"
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "css selector",
        "value": "div.recipient_rigth"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "css selector",
        "value": "div.recipient_rigth"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "id",
        "value": "recipient_email_0"
      }
    },
    {
      "type": "setElementText",
      "locator": {
        "type": "id",
        "value": "recipient_email_0"
      },
      "text": "qwe@gmail.com"
    },
    {
      "type": "setElementText",
      "locator": {
        "type": "id",
        "value": "Confirm_email_0"
      },
      "text": "qwe@gmail.com"
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "xpath",
        "value": "//div[@class='orderContinue']/div[2]/input"
      }
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "xpath",
        "value": "//div[@class='orderContinue']/div[2]/input"
      }
    },
    {
      "type": "storeCurrentUrl",
      "variable": "tanaguru"
    }
  ],
  "data": {
    "configs": {},
    "source": "none"
  },
  "inputs": [],
  "timeoutSeconds": 60
}

Regards
Priya

same result with your Json file.
I don’t know exactly why ? :slightly_frowning_face:

Hi,

I’ve just tried your scenario “manuallly” and the step 2 does not work,
There is no link with the “GIFT CARDS” text in the www.delta.com webpage.

More generally, when you create scenario, try to use the css selector, or the xpath selector as often as possible,

yes, it’s certainly the best way.

perahps with these following code (not tested)

{
“type”: “clickElement”,
“locator”: {
“type”: “xpath”,
“value”: “//a[@href=‘/content/www/en_US/shop/gift-card.html’]”
} }

or (not tested too)

{
“type”: “clickElement”,
“locator”: {
“type”: “xpath”,
“value”: “//a[contains(@href,‘gift-card’)”
} }


a link exist with the “GIFT CARDS” text in the HTML but in lowercase and a CSS property (text-transform: uppercase;) is ussed.

Hello,

Thank you for the reply. So by this if we have to use xpath or css selector, do we need to write scripts manually instead of recording using selenium builder to make sure we are not missing anything?

Regards
Priya

Thank you for the Information…