The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 802 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.1 (Linux)
File Line Function
/showthread.php 802 errorHandler->error



Current time: 12-13-2019, 10:23 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webpagetest returning value "undefined" in function callback
05-26-2016, 08:15 AM (This post was last modified: 05-26-2016 11:14 AM by anilpothala.)
Post: #1
Webpagetest returning value "undefined" in function callback
HI Guys,

Can some one help me on how to get test id in callback method.

Below is the script

it('WebpageTest Homepage', function(done) {

var script = wpt.scriptToString([
{navigate: config.homepage},
'waitForComplete'
]);
wpt.runTest(script, {
label: 'homepagetest',
runs: 1,
pollResults: 5,
firstViewOnly : true,
connectivity: "3GFast",
emulateMobile:true,
specs:path.join(__dirname, 'specs.json'),},

function(err, res) {
console.log("============"+res)

assert.equal(err, 0);
done();

});


in console log im getting value of "res" or "res.data" as undefined. can some one please suggest here if im doing anything wrong. Test was running fine with out any issues.
I wanted to capture testId from callback function(res.data.testId).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Webpagetest returning value "undefined" in function callback - anilpothala - 05-26-2016 08:15 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)