@@ -750,217 +750,7 @@ When I select `$option` in dropdown located `$locator`
750
750
When I select `Red` in dropdown located by `id(colors)`
751
751
----
752
752
753
-
754
- === Cookie Steps
755
-
756
- ==== Validate cookie presence
757
-
758
- Validates whether the certain cookie is set.
759
-
760
- [source,gherkin]
761
- ----
762
- Then cookie with name that $stringComparisonRule `$cookieName` is set
763
- ----
764
- * `$stringComparisonRule` - xref:parameters:string-comparison-rule.adoc[String comparison rule].
765
- * `$cookieName` - The name of the cookie to check presence.
766
-
767
- .Check the session cookie is present
768
- [source,gherkin]
769
- ----
770
- Then cookie with name that is equal to `JSESSIONID` is set
771
- ----
772
-
773
- ==== Validate cookie absence
774
-
775
- Validates whether the certain cookie is not set.
776
-
777
- [source,gherkin]
778
- ----
779
- Then cookie with name that $stringComparisonRule `$cookieName` is not set
780
- ----
781
- * `$stringComparisonRule` - xref:parameters:string-comparison-rule.adoc[String comparison rule].
782
- * `$cookieName` - The name of the cookie to check absence.
783
-
784
- .Check that Google Analytics cookies are not present
785
- [source,gherkin]
786
- ----
787
- Then cookie with name that matches `_ga.*` is not set
788
- ----
789
-
790
- ==== Set cookies
791
-
792
- Adds the cookies provided in the input xref:ROOT:glossary.adoc#_examplestable[ExamplesTable]. It's allowed to add the
793
- cookies for the current domain only: make sure the web browser is opened at the
794
- expected domain. The actions performed by the step:
795
-
796
- * add the cookies;
797
- * refresh the current page (this action is required to apply the changes in cookies).
798
-
799
- [source,gherkin]
800
- ----
801
- When I set all cookies for current domain:$parameters
802
- ----
803
- * `$parameters` - The parameters of the cookies to set as xref:ROOT:glossary.adoc#_examplestable[ExamplesTable]:
804
- +
805
- [cols="1,2", options="header"]
806
- |===
807
-
808
- |Column Name
809
- |Description
810
-
811
- |`cookieName`
812
- |the name of the cookie to set
813
-
814
- |`cookieValue`
815
- |the value of the cookie to set
816
-
817
- |`path`
818
- |the path of the cookie to set
819
-
820
- |===
821
-
822
- .Set the cookie for the current domain
823
- [source,gherkin]
824
- ----
825
- When I set all cookies for current domain:
826
- |cookieName |cookieValue |path |
827
- |cookieAgreed |2 |/ |
828
- ----
829
-
830
- ==== Set cookies without applying changes
831
-
832
- Adds the cookies provided in the input xref:ROOT:glossary.adoc#_examplestable[ExamplesTable], but does not apply the
833
- changes in cookies. The current page must be refreshed or the navigation must be performed to apply the cookie changes.
834
- It's allowed to add the cookies for the current domain only: make sure the web browser is opened at the expected domain.
835
-
836
- [source,gherkin]
837
- ----
838
- When I set all cookies for current domain without applying changes:$parameters
839
- ----
840
- * `$parameters` - The parameters of the cookies to set as xref:ROOT:glossary.adoc#_examplestable[ExamplesTable]:
841
- +
842
- [cols="1,2", options="header"]
843
- |===
844
-
845
- |Column Name
846
- |Description
847
-
848
- |`cookieName`
849
- |the name of the cookie to set
850
-
851
- |`cookieValue`
852
- |the value of the cookie to set
853
-
854
- |`path`
855
- |the path of the cookie to set
856
-
857
- |===
858
-
859
- .Set the cookie for the current domain
860
- [source,gherkin]
861
- ----
862
- When I set all cookies for current domain without applying changes:
863
- |cookieName |cookieValue |path |
864
- |cookieAgreed |2 |/ |
865
- When I refresh page
866
- ----
867
-
868
- ==== Get cookie value
869
-
870
- Finds the cookie by the name and saves its value to a variable.
871
-
872
- [source,gherkin]
873
- ----
874
- When I save value of cookie with name `$cookieName` to $scopes variable `$variableName`
875
- ----
876
- * `$cookieName` - The name of the cookie to save the value.
877
- * `$scopes` - xref:commons:variables.adoc#_scopes[The comma-separated set of the variables scopes].
878
- * `$variableName` - The variable name to save the cookie value.
879
-
880
- .Get the value of the session cookie
881
- [source,gherkin]
882
- ----
883
- When I save value of cookie with name `JSESSIONID` to scenario variable `session-id`
884
- ----
885
-
886
- ==== Get cookie
887
-
888
- Finds the cookie by the name and saves all its parameters as JSON to a variable.
889
-
890
- [source,gherkin]
891
- ----
892
- When I save cookie with name `$cookieName` as JSON to $scopes variable `$variableName`
893
- ----
894
- * `$cookieName` - The name of the cookie to save.
895
- * `$scopes` - xref:commons:variables.adoc#_scopes[The comma-separated set of the variables scopes].
896
- * `$variableName` - The variable name to save the cookie.
897
-
898
- .Get the session cookie
899
- [source,gherkin]
900
- ----
901
- When I save cookie with name `JSESSIONID` as JSON to scenario variable `session-id`
902
- ----
903
-
904
- ==== Remove cookie
905
-
906
- Removes the certain cookie from the current domain. The actions performed by the step:
907
-
908
- * remove the certain cookie the from current domain;
909
- * refresh the current page (this action is required to apply the changes in cookies).
910
-
911
- [source,gherkin]
912
- ----
913
- When I remove cookie with name `$cookieName` from current domain
914
- ----
915
- * `$cookieName` - The name of the cookie to remove.
916
-
917
- .Remove the session cookie
918
- [source,gherkin]
919
- ----
920
- When I remove cookie with name `JSESSIONID` from current domain
921
- ----
922
-
923
- ==== Remove cookie without applying changes
924
-
925
- Removes the certain cookie from the current domain, but does not apply the
926
- changes in cookies. The current page must be refreshed or the navigation must
927
- be performed to apply the cookie changes.
928
-
929
- [source,gherkin]
930
- ----
931
- When I remove cookie with name `$cookieName` from current domain without applying changes
932
- ----
933
- * `$cookieName` - The name of the cookie to remove.
934
-
935
- .Remove the session cookie
936
- [source,gherkin]
937
- ----
938
- When I remove cookie with name `JSESSIONID` from current domain without applying changes
939
- When I refresh page
940
- ----
941
-
942
- ==== Remove all cookies
943
-
944
- Removes all cookies from the current domain. The actions performed by the step:
945
-
946
- * remove all cookies from the current domain;
947
- * refresh the current page (this action is required to apply the changes in cookies).
948
-
949
- [source,gherkin]
950
- ----
951
- When I remove all cookies from current domain
952
- ----
953
-
954
- ==== Remove all cookies without applying changes
955
-
956
- Removes all cookies from the current domain, but does not apply the changes in
957
- cookies. The current page must be refreshed or the navigation must be performed
958
- to apply the cookie changes.
959
-
960
- [source,gherkin]
961
- ----
962
- When I remove all cookies from current domain without applying changes
963
- ----
753
+ include::plugins:partial$web-cookie-steps.adoc[]
964
754
965
755
include::plugins:partial$web-storage-steps.adoc[]
966
756
0 commit comments