I'm starting to learn typescript and Playwright, and I need to make a GET call inside a Playwright test.
This call is for creating a session and will return a json with a SESSION_ID that I'll include later in the URL.
Thanks, Jose.
I've tried by adding jquery dependences:
npm i --save-dev @types/jquery
, but running this code:
import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
var settings = {
"url": "http://xxxxxx.yyyyyy.com:8080/ords/hero_ords/heroapps/v1/mysession",
"method": "GET",
"timeout": 0,
};
$.ajax(settings).done(function (response) {
console.log(response);
});
});
I get this error: ReferenceError: $ is not defined
Thanks, Jose.