Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 如何在角e2e测试中从URL中提取Id_Angularjs_E2e Testing - Fatal编程技术网

Angularjs 如何在角e2e测试中从URL中提取Id

Angularjs 如何在角e2e测试中从URL中提取Id,angularjs,e2e-testing,Angularjs,E2e Testing,我正在使用量角器为我的角度应用程序编写e2e测试用例。 这是我的密码 it('Select Dashboard.....', function(){ element.all(by.css('.caption p a')).get(0).click(); browser.getLocationAbsUrl().then(function(url) { expect(url.split('#')[1]).toBe('

我正在使用量角器为我的角度应用程序编写e2e测试用例。 这是我的密码

it('Select Dashboard.....', function(){ 
             element.all(by.css('.caption p a')).get(0).click();
             browser.getLocationAbsUrl().then(function(url) {
               expect(url.split('#')[1]).toBe('/patientDashboard/encounters/1');
             });
         });
如何从URL/patientDashboard/Conferences/1中提取ID?
因为我在多个不同ID的地方使用相同的URL。

/\d+$/.execurl[0]@Phil你能解释清楚吗