Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

[Cookie][Chrome] Can any one could provide a cookie example when using chrome #886

Open
Kenith opened this issue Mar 1, 2018 · 4 comments

Comments

@Kenith
Copy link

Kenith commented Mar 1, 2018

Hello All,

We would like to load cookie before accessing the urls.
Is there anyone could provide a sample about how to use cookie with Gemini + Chrome?

Really appreciate for your help in advance.

Thank you,
Ken

@Kenith
Copy link
Author

Kenith commented Mar 1, 2018

I tried followings, failed:

gemini.suite('1', function(suite) {

    suite
        .setUrl('http://127.0.0.1:8080/', function(actions) {
            actions.setCookie({"name": "ken", "value": "tomato", "url": "http://127.0.0.1:8080"})
        })
        .setCaptureElements('html')
        .capture('plain', function(actions) {
            actions.waitForElementToShow('ken', 30000)
        })
});

@Hrommi
Copy link

Hrommi commented Mar 13, 2018

How about executeJS?

@Kenith
Copy link
Author

Kenith commented Apr 21, 2018

@Hrommi Sorry for the delay, and really appreciate for your help.

As far as I know, the executeJS could only be run after page load.
Is it possible to set the cookie before the page load?

Thank you,
Ken

@wabisabit
Copy link

It can be done with executeJS this way: #799

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants