cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

Adding actions to the Visit method #461

Closed Githraine closed 5 years ago

Githraine commented 6 years ago

I have a case where I need to add several cookies to the browser before tests run. This cannot be added into the Hooks, because it has to occur after the website under test loads. I dont see anywhere I can add this in besides jamming it into every pageobject which would be really ugly. The only common place i can see to put it would be within the Visit call.

jkotests commented 5 years ago

@Githraine , sorry for not having a response for so long. Is this still an issue for you?

Maybe I'm mis-understanding the problem, but couldn't you set the cookies where you initialize the browser?

Githraine commented 5 years ago

Jo, thank you. We found a way to make this work. Thanks.