You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespace SpecBind.Selenium.IntegrationTests.Pages
{
using SpecBind.Pages;
[PageNavigation("/")]
[SetCookie("MyCookie", "some value", Expires = "3600")]
public class CookiePage
{
}
}
Exception:
System.InvalidOperationException: unable to set cookie
(Session info: headless chrome=63.0.3239.132)
(Driver info: chromedriver=2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 10.0.15063 x86_64) (NoSuchCollection)
Stack Trace:
at SpecBind.ActionPipeline.ActionResultExtensions.CheckActionResult(ActionResult result) in C:\github\dpiessens\specbind\src\SpecBind\ActionPipeline\ActionResultExtensions.cs:line 46
at SpecBind.ActionPipeline.ActionResultExtensions.CheckResult[T](ActionResult result) in C:\github\dpiessens\specbind\src\SpecBind\ActionPipeline\ActionResultExtensions.cs:line 20
at SpecBind.PageNavigationSteps.GivenNavigateToPageWithArgumentsStep(String pageName, Table pageArguments) in C:\github\dpiessens\specbind\src\SpecBind\PageNavigationSteps.cs:line 125
at SpecBind.PageNavigationSteps.GivenNavigateToPageStep(String pageName) in C:\github\dpiessens\specbind\src\SpecBind\PageNavigationSteps.cs:line 99
at lambda_method(Closure , IContextManager , String )
at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
at SpecBind.Selenium.IntegrationTests.Features.SetCookieFeature.ScenarioCleanup()
at SpecBind.Selenium.IntegrationTests.Features.SetCookieFeature.BeforeFirstNavigation() in C:\github\dpiessens\specbind\src\SpecBind.Selenium.IntegrationTests\Features\SetCookieTests.feature:line 5
If the page decorated with the SetCookie attribute is not navigated to first, then the exception is not thrown.
For example
Scenario: Before first navigation
Given I navigated to the Home page
When I navigate to the Cookie page
Then I am on the Cookie page
The text was updated successfully, but these errors were encountered:
Hi.
An exception is thrown when trying to first navigate to a page decorated with the
SetCookie
attribute..\SpecBind.Selenium.IntegrationTests\Features\SetCookieTests.feature
.\SpecBind.Selenium.IntegrationTests\Pages\CookiePage.cs
Exception:
Stack Trace:
If the page decorated with the
SetCookie
attribute is not navigated to first, then the exception is not thrown.For example
The text was updated successfully, but these errors were encountered: