My Scenario is writing a script to search flights from Los Angles to Houston George Bush Internationational Air port with filters
- Oneway Flight
- Nonstop flight
I got search result as in picture
Now I want to verify results that it should be only having Nonstop flights or not
How i could do this?
I'm using Testcafe testing framework
Error message i got on console
CodePudding user response:
Use assertions to check if the tested page’s state matches the expected state.
CodePudding user response:
Could you try the following code snippet in your test:
test('test name', async t =\> {
const elVal = await Selector('#ELEMENTID').value
console.log(elVal)
});
I suppose you need to use the Selector Object in your test, since the ClientFunction Object is intended for retrieving serialized data, so you cannot use the result of ClientFunction for working directly with DOM objects.