如何通过Codeception接受SSL证书弹出窗口?

时间:2018-06-27 16:56:47

标签: php selenium automated-tests selenium-chromedriver codeception

我正在使用Codeception PHP框架进行自动测试,并且正在使用seleniod在chrome驱动程序和selenium独立服务器中进行测试

我遇到这样的情况,要求我单击“确定”以接受SSL证书,如图所示:

enter image description here

我想知道如何通过代码接收来接受此警报 我尝试添加yml文件:

modules:
    enabled:
        - WebDriver:
                 browser: chrome
                 url: 'https://creditplus.ru/'
                 host: 0.0.0.0
                 window_size: 1376x768
                 restart: true
                 port: 1212

                 capabilities:
                  unexpectedAlertBehaviour: 'accept'
                  AcceptUntrustedCertificates: true
                  AssumeUntrustedCertificateIssuer: true

没有任何成功(我不想忽略我想接受的事情)

我的第二个问题:

当我们使用seleniod

时,有某种方法可以将SSL证书从本地浏览器传递到YML文件。

例如我的selienod confing文件如下:

modules:
    enabled:
        - Setter:
              source: bank
        - WebDriver:
                         browser: chrome
                         url: 'https://creditplus.ru/'
                         host: 192.168.4.117
                         window_size: 1376x768
                         restart: true
                         port: 4444
                         capabilities:
                          browserName: "chrome"
                          version: "65"
                          browserTimeout: 500
                          enableVNC: true
                          sessionTimeout: 120
                          name: "RO cash"

我可以将SSL证书导入此配置吗?

所以总结两个问题:

  1. 如何使用Codeception硒独立服务器(Chrome驱动程序)接受SSL证书警报

  2. 如何将SSL证书导入到seleniod配置

0 个答案:

没有答案
相关问题