How to extract browser cookie(s) using Katalon Studio

為{幸葍}努か 提交于 2021-01-29 00:48:12

问题


I am trying to get all the cookies of the browser which is opened while we execute automation test using Katalon.

Please suggest how we can extract a specific cookie/list of cookies using Katalon.

I have checked in traditional Selenium/Java; its pretty easy -

driver.manage().getCookieNamed("Cookie Name").getValue();

But I am not getting any clue how to do this in Katalon.


回答1:


Resolved it....

import com.kms.katalon.core.webui.driver.DriverFactory 
import org.openqa.selenium.WebDriver 

WebDriver driver = DriverFactory.getWebDriver() println driver.manage().getCookieNamed("Cookie Name").getValue() 


来源:https://stackoverflow.com/questions/54899900/how-to-extract-browser-cookies-using-katalon-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!