如何使用Python在Selenium Webdriver上获取会话ID? [英] How to get session id on Selenium webdriver using Python?

查看:523
本文介绍了如何使用Python在Selenium Webdriver上获取会话ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SauceLabs,我需要sessionId在那里获取作业ID,并在测试执行期间使用它来设置通过/失败状态.如何使用python获取会话ID?

Im using SauceLabs and I need the sessionId to get the Job Id there and use it to set pass/fail status during execution of the test. How can I get the session Id using python?

推荐答案

找到了!

可以通过

self.driver.session_id

在SauceLabs上使用该值来标识作业(作业ID)

That value is used on SauceLabs to identify the Jobs (Job ID)

这篇关于如何使用Python在Selenium Webdriver上获取会话ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆