如何使用Katalon Studio提取浏览器cookie [英] How to extract browser cookie(s) using Katalon Studio
本文介绍了如何使用Katalon Studio提取浏览器cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试获取在使用Katalon执行自动化测试时打开的浏览器的所有cookie.
I am trying to get all the cookies of the browser which is opened while we execute automation test using Katalon.
请建议我们如何使用Katalon提取特定的cookie/cookie列表.
Please suggest how we can extract a specific cookie/list of cookies using Katalon.
我已经检查了传统的Selenium/Java;非常简单-
I have checked in traditional Selenium/Java; its pretty easy -
driver.manage().getCookieNamed("Cookie Name").getValue();
但是我不知道如何在Katalon中做到这一点.
But I am not getting any clue how to do this in Katalon.
推荐答案
解决了....
import com.kms.katalon.core.webui.driver.DriverFactory
import org.openqa.selenium.WebDriver
WebDriver driver = DriverFactory.getWebDriver() println driver.manage().getCookieNamed("Cookie Name").getValue()
这篇关于如何使用Katalon Studio提取浏览器cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文