/**
  * Stop capturing http request by browsermobproxy and add assertion check in test plan.
  *
  * @Given /^I capture "([^"]*)" http request and ensure "([^"]*)" exists on page with following globals from page:$/
  */
 public function stop_capture_request_and_assert_and_set_global($capturelabel, $assertiontext, TableNode $globaldata)
 {
     // Capture data if it's not in testplan-json-dist.
     $request = $this->confirm_requests_to_capture($capturelabel);
     $globaldata = $globaldata->getRows();
     $data = array();
     foreach ($globaldata as $value) {
         $data[$value[0]] = $value[1];
     }
     // Update testplan.
     testplan_writer::add_request_data($capturelabel, $request, $assertiontext, $data);
 }