Clear_Capital__
12 years agoContributor
populating incorrect namespace is Xpath assertion
I have a REST URI , something like
https://testserver.mycompanydomain.com/v1/employee/
its used to pull employee information , by passing employee id
https://testserver.mycompanydomain.com/ ... yee/123456
When I trying to create Xpath Assersion, its declaring namespace like this
declare namespace ns1='https://testserver.mycompanydomain.com/v1/employee/345678';
//ns1:Response[1]/ns1:employeeID[1]
where 345678 is the employee id passed in the most recent request. So the name space become dynamic, and the Xpath assertion when trying to use this assertion for a different employee id
instead, name space should be declared as (without the hardcoded employee id value)
declare namespace ns1='https://testserver.mycompanydomain.com/v1/employee/';
//ns1:Response[1]/ns1:employeeID[1]
Please advise on what could be wrong and possible solutions.
Thank you
https://testserver.mycompanydomain.com/v1/employee/
its used to pull employee information , by passing employee id
https://testserver.mycompanydomain.com/ ... yee/123456
When I trying to create Xpath Assersion, its declaring namespace like this
declare namespace ns1='https://testserver.mycompanydomain.com/v1/employee/345678';
//ns1:Response[1]/ns1:employeeID[1]
where 345678 is the employee id passed in the most recent request. So the name space become dynamic, and the Xpath assertion when trying to use this assertion for a different employee id
instead, name space should be declared as (without the hardcoded employee id value)
declare namespace ns1='https://testserver.mycompanydomain.com/v1/employee/';
//ns1:Response[1]/ns1:employeeID[1]
Please advise on what could be wrong and possible solutions.
Thank you