Closed RazvanB2 closed 8 years ago
Thanks @Krusher21 for this issue and such detailed explanation.
Hello @Krusher21 It seems that you did not provide your capabilities in correct format: based on manual you should instead of:
serenity.driver.capabilities=INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS:true
serenity.driver.capabilities=ACCEPT_SSL_CERTS:true
add next line to your property:
serenity.driver.capabilities=INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS:true;ACCEPT_SSL_CERTS:true
after processing capabilities they will be added to driver as:
capabilities.setCapability("INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS",true);
capabilities.setCapability("ACCEPT_SSL_CERTS",true);
How did you check what capabilities passed to you webdriver after initialization?
Hello @YamStranger,
Thank you for your quick reply; unfortunately the driver still seems to not load any property from serenity.properties file.
I've checked the capabilities that appear in the stack trace and more than that my goal is to make IE use websso and not ask for credentials every time I open a page.
Here is the loaded IE driver:
Command duration or timeout: 102 milliseconds Build info: version: '2.50.1', revision: 'd7fc91b29de65b790abb01f3ac5f7ea2191c88a7', time: '2016-01-29 11:11:26' System info: host: 'DEFRAVD825647', ip: '10.38.48.221', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_51' Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, proxy={proxyType=}, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:45391/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
`
This how I'm figuring that the serenity.properties file is read by the framework:
09:22:12.378 [main] DEBUG n.thucydides.core.steps.StepEventBus - Test suite started for story net.thucydides.core.model.Story@e32d1ee5 09:22:12.409 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.417 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.417 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - webdriver.driver=iexplorer 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - serenity.driver.capabilities=INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS:true;ACCEPT_SSL_CERTS:true 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - serenity.project.name=Demo Project using Serenity and Cucumber 09:22:12.456 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - serenity.requirement.types=epic, feature 09:22:12.729 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.729 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:12.729 [main] INFO n.t.c.u.PropertiesFileLocalPreferences - LOADING LOCAL PROPERTIES FROM C:\Users\boteraz\Serenity\serenity-maven-archetypes-master\SerenityAndCucumberProj\serenity.properties 09:22:13.130 [main] DEBUG n.s.plugins.jira.JiraListener - JIRA LISTENER STATUS 09:22:13.130 [main] DEBUG n.s.plugins.jira.JiraListener - JIRA URL: null 09:22:13.130 [main] DEBUG n.s.plugins.jira.JiraListener - REPORT URL: null 09:22:13.130 [main] DEBUG n.s.plugins.jira.JiraListener - WORKFLOW ACTIVE: false 09:22:13.130 [main] INFO n.thucydides.core.steps.StepEventBus - Registering custom listener net.serenitybdd.plugins.jira.JiraListener@1a8898 09:22:13.130 [main] INFO net.serenitybdd.core.Serenity - Test Suite Started: Reflected Cross Site Scripting 09:22:13.193 [main] INFO net.serenitybdd.core.Serenity - `
--Razvan
@Krusher21 When you call in your code lines:
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
actually they processed like
capabilities.setCapability("ignoreProtectedModeSettings", true);
so, if you will use correct string values IE will accept them, otherwise IE will ignore them.
Please try to use string representation of your capabilities:
Here is how they look like: INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS ACCEPT_SSL_CERTS
Thanks!
It seems that this issue already fixed or not an issue any more.
Infact I am also facing the same issue - I am using IE8
Is there an update to which version was it fixed in or any other workarounds ?
Could you explain what issue you are having exactly?
Basically, even after adding the below line to serenity.properties:
serenity.driver.capabilities=INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS:true;ACCEPT_SSL_CERTS:true
it still throws the SSL popup and gets stuck on that page.
For some a strange reason it doesnt even give an handle to accept the warnings by doing
driver.navigate().to("javascript:document.getElementById('overridelink').click()");
Have you tried with native Selenium?
well, we tried accepting SSL warning using vanilla cucumber and native selenium as well: driver.navigate().to("javascript:document.getElementById('overridelink').click()");
and it worked. Thats how we are working at the moment.
Hi guys,
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
and I simply cannot make Serenity use this config at all. I've tried with serenity.properties; creating an @Managed custom driver but nothing seems to work. I really need some help. If there is anything unclear I can add more info. Thank you, Razvan
serenity.properties
webdriver.driver = iexplorer webdriver.ie.driver=.\libs\IEDriverServer.exe serenity.driver.capabilities=INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS:true serenity.driver.capabilities=ACCEPT_SSL_CERTS:true
pom.xml `<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
`