我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何检测硒?

In my PHP application I'd like to detect requests that are for Selenium tests. Mainly because I'd like to use a separate database for tests. Is it possible?

By default, there is nothing indicating that a browser is automated by selenium as opposed to it being used by a real user. What you can do is to set a specific custom cookie, see:

  • Handling Cookies in Webdriver

You can set custom user agent: https://code.google.com/p/selenium/wiki/TipsAndTricks

近期文章

  • 当尝试运行coxph时R会话中止
  • foreach $ _POST as $ value create
  • 用PHP自定义文本图像
  • 通过显示模式提交表格
  • php / sql连接多个字段的表
  • brew之后安装php56无法找到php扩展
  • PHP将数据从mysql数据库输出到XML文件
  • WooCommerce预订 - 可用日期作为下拉菜单
  • 如何使用nusoap解决xml加载解析soap有效负载?
  • .htaccess规则从静态文件中提供“bla.php?id = 1”
  • 没有jQuery或JS的PHP HTML排序/分页/搜索
  • 使用php datetime对象检查忽略年份的月份和日期
  • 高级自定义字段 - 从其他页面选择复选框
  • 如何在Heroku上使用Swaggervel?
  • php想象一些格式缺失
  • 从单个表单提交创建一组实体的实例
  • .htaccess文件无法重命名子文件夹而是找不到页面
  • 使用URL和meta_key进行Wordpress过滤
  • 如何生成注册号。 当用户点击PHP中的“提交”按钮时?
  • 如何在自己的项目中使用wp_set_current_user?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华