From a2b58202a08f5b5d95e51154d31033b8aa6886f3 Mon Sep 17 00:00:00 2001 From: Jeff Cross Date: Thu, 15 Jan 2015 10:51:47 -0800 Subject: [PATCH] feat(benchpress): add getStringParameter method to support text and radio inputs --- modules/e2e_test_lib/src/benchmark_util.js | 22 +++++++++++++++++++--- tools/build/snippets/url_params_to_form.js | 8 +++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/modules/e2e_test_lib/src/benchmark_util.js b/modules/e2e_test_lib/src/benchmark_util.js index a82c4f0e2c..277e289a63 100644 --- a/modules/e2e_test_lib/src/benchmark_util.js +++ b/modules/e2e_test_lib/src/benchmark_util.js @@ -2,11 +2,27 @@ import {DOM, document, location} from 'facade/dom'; import {NumberWrapper, BaseException, isBlank} from 'facade/lang'; export function getIntParameter(name:string) { - var el = DOM.querySelector(document, `input[name="${name}"]`); - if (isBlank(el)) { + return NumberWrapper.parseInt(getStringParameter(name), 10); +} + +export function getStringParameter(name:string) { + var els = DOM.querySelectorAll(document, `input[name="${name}"]`) + var value; + var el; + + for (var i=0; i