You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { ClientFunction } from 'testcafe'; or const {ClientFunction} = require('testcafe');
When I try to use ClientFunction for JQuery in Cucumber-Testcafe frame-work, I get below error.
"ClientFunction cannot implicitly resolve the test run in context of which it should be executed. If you need to call ClientFunction from the Node.js API callback,
pass the test controller manually via ClientFunction's .with({ boundTestRun: t }) method first. Note that you cannot execute ClientFunction outside the test code."
I'm trying to call below JQuery, can you help me how to call it '.with({ boundTestRun: t })'
import { ClientFunction } from 'testcafe'; or const {ClientFunction} = require('testcafe');
When I try to use ClientFunction for JQuery in Cucumber-Testcafe frame-work, I get below error.
"ClientFunction cannot implicitly resolve the test run in context of which it should be executed. If you need to call ClientFunction from the Node.js API callback,
pass the test controller manually via ClientFunction's
.with({ boundTestRun: t })
method first. Note that you cannot execute ClientFunction outside the test code."I'm trying to call below JQuery, can you help me how to call it '.with({ boundTestRun: t })'
After few more tries, I wrapped JQuery in Client function like this :
returnDefValue: function (pageElem, t) {
return ClientFunction(document.querySelectorAll("select[name='dropdown-emailGroupBy']")[0].value).with({ boundTestRun: t });
},
it gives me the response , "ReferenceError: document is not defined"
===
So I'm not able to use the JQuery function with Cucumber, that is usually supported by a Client Function wrapper in testcafe ..
e.g export const returnDefValue = ClientFunction(function (pageElem) {
// window.scrollBy(0, 1000);
return document.querySelectorAll(pageElem)[0].value
});
The text was updated successfully, but these errors were encountered: