diff --git a/docs/api/expect/index.md b/docs/api/expect/index.md index 29f7492..b7a55ca 100644 --- a/docs/api/expect/index.md +++ b/docs/api/expect/index.md @@ -98,7 +98,54 @@ These methods will perform assertions on the specified target on the current ele -<%- include('./_cookie.md') %> + + + + +
browser.expect.cookie('cookie-name', ['cookie-domain'])
+this.demoTest = function (browser) {
+ browser.expect.cookie('cookie-name').to.contain('cookie-value');
+ browser.expect.cookie('cookie-name').to.match(/regex/);
+ browser.expect.cookie('loginCookie', 'example.org').to.contain('cookie-value');
+};
+Name | +Type | +description | +
---|---|---|
name |
+ String | +The name of the cookie to be inspected. | +
domain Optional |
+ String | +The domain name on which the cookie is set to. | +
this.demoTest = function (browser) {
+ browser.expect.title().to.contain('value');
+ browser.expect.title().to.match(/value/);
+};
+this.demoTest = function (browser) {
+ browser.expect.url().to.contain('https://');
+ browser.expect.url().to.endWith('.org');
+};
+