From e2b53ba23ad4c2ec78b647e7205448d2cd7dfd5f Mon Sep 17 00:00:00 2001 From: Grzegorz Szczutkowski Date: Thu, 12 Jul 2018 20:11:58 +0200 Subject: [PATCH 1/2] Add description about filters --- docs/docs.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/docs.md b/docs/docs.md index 8cf798ba91..6e5d4113b2 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -223,6 +223,18 @@ $(By.cssSelector(".header")) // Native Selium `By` locator $(".fluent", withName("foo"), withId("id1")) // Filter chaining ``` +Available filter methods with descriptions are shown in the table below: + +| Method | Description | +| ------ | ----------- | +| withName(String text) | Filers elements with 'name' attribute equals to value passed as an method argument | +| withId(String id) | Filers elements with 'id' attribute equals to value passed as an method argument | +| withClass(String klass) | Filers elements with 'class' attribute equals to value passed as an method argument | +| withText(String text) | Filers elements with inner text that has to be displayed and equals to value passed as an method argument | +| containingText(String text) | Filers elements with inner text that has to be displayed and contains the value passed as an method argument | +| withTextContent(String text) | Filers elements with inner text that can be displayed or hidden and equals to value passed as an method argument | +| containingTextContent(String text) | Filers elements with inner text that can be displayed or hidden and contains the value passed as an method argument | + You can do more complex string matching on the above filters using the following methods: - `contains` From a8d4f3c606c7ed8ef0efa88944fb5dbeb700670e Mon Sep 17 00:00:00 2001 From: Filip Cynarski Date: Fri, 17 Aug 2018 14:34:25 +0200 Subject: [PATCH 2/2] Update docs.md --- docs/docs.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs.md b/docs/docs.md index 6e5d4113b2..6d81571dec 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -219,7 +219,7 @@ $(".fluent", withClass("foo")) $(".fluent", withId("idOne")) $(".fluent", withText("This field is mandatory.")) $(withId("idOne")) // Filter only -$(By.cssSelector(".header")) // Native Selium `By` locator +$(By.cssSelector(".header")) // Native Selenium `By` locator $(".fluent", withName("foo"), withId("id1")) // Filter chaining ``` @@ -227,13 +227,13 @@ Available filter methods with descriptions are shown in the table below: | Method | Description | | ------ | ----------- | -| withName(String text) | Filers elements with 'name' attribute equals to value passed as an method argument | -| withId(String id) | Filers elements with 'id' attribute equals to value passed as an method argument | -| withClass(String klass) | Filers elements with 'class' attribute equals to value passed as an method argument | -| withText(String text) | Filers elements with inner text that has to be displayed and equals to value passed as an method argument | -| containingText(String text) | Filers elements with inner text that has to be displayed and contains the value passed as an method argument | -| withTextContent(String text) | Filers elements with inner text that can be displayed or hidden and equals to value passed as an method argument | -| containingTextContent(String text) | Filers elements with inner text that can be displayed or hidden and contains the value passed as an method argument | +| withName(String text) | Filters elements with 'name' attribute equals to value passed as an method argument | +| withId(String id) | Filters elements with 'id' attribute equals to value passed as an method argument | +| withClass(String cssClassName) | Filters elements with 'class' attribute equals to value passed as an method argument | +| withText(String text) | Filters elements with inner text that has to be displayed and equals to value passed as an method argument | +| containingText(String text) | Filters elements with inner text that has to be displayed and contains the value passed as an method argument | +| withTextContent(String text) | Filters elements with inner text that can be displayed or hidden and equals to value passed as an method argument | +| containingTextContent(String text) | Filters elements with inner text that can be displayed or hidden and contains the value passed as an method argument | You can do more complex string matching on the above filters using the following methods: