Probé el siguiente código pero no pude hacer la solicitud de publicación al pasar la variable a la ruta
var projectId = browser.driver.findElement(By.xpath("//data[contains(text(),'0')]")); projectId.getAttribute('value'); var projectIdValue = projectId.getText(); projectIdValue.then(function(text) { console.log(text); const http = new HttpClient("https://xxxx/abc/d/"); console.log("http object data:"+ http.baseUrl); var postResponse = http.post("/"++projectIdValue,'{"jsonrpc": "2.0", "id": 1, "method": "some method", "params":["100000",true]}','"Content-Type": "application/json'); http.failOnError = true; expect(postResponse.statusCode).toEqual(200);
Intenté pasar Variable directamente, funciona bien:
var projectIdValue = "127df5bc43a14059b2afa0aa78f19b0d"; //postResponse = http.post("/127df5bc43a14059b2afa0aa78f19b0d",'{"jsonrpc": "2.0", "id": 1, "method": "some method", "params":["0x989680",true]}','"Content-Type": "application/json');