所以这是我得到的回复,我无法提取“webToken”,应该是JSON路径表达式...我已经尝试过$..webToken
和$.webToken
。
我试图在JMeter中使用它,所以我可以传递值
<script>
function insertInSessionStorage(key, value){
window.sessionStorage.setItem(key,value);
//JSON.parse(window.sessionStorage.getItem("userJSON")).firstName
}
insertInSessionStorage("userJSON",'{"userId":"123456","firstName":"John","middleInitial":"","lastName":"Smith","email":"JOhnsmith@johnsmith.com","ldapLob":"Corporate ","countryCd":"US","webToken":"5085c443-f05e-42bf-90de-1a7ad4beb6f2","userRoleList":["contact_maintenance","contact_admin"]}');
insertInSessionStorage("logoutSmUrl",'https://smlogin-qa.testnet.net/siteminderagent/ssologout/Logout.html');
window.history.pushState({page: 1}, "", "https://smlogin-qa.testnet.net/siteminderagent/ssologout/Logout.html");
window.onpopstate = function(event) {
if(event){
window.location='https://smlogin-qa.testnet.net/siteminderagent/ssologout/Logout.html';
}
}
</script>
答案 0 :(得分:0)