From d58f1fc68b3862fb31a8c651cce9388d926af38a Mon Sep 17 00:00:00 2001 From: MrTango Date: Thu, 6 Jul 2017 15:56:22 +0300 Subject: [PATCH] Add 'Remove line from textarea' keyword --- docs/source/plone-keywords/generic.rst | 16 ++++++++++++++++ docs/source/plone-keywords/index.rst | 1 + src/plone/app/robotframework/keywords.robot | 6 ++++++ 3 files changed, 23 insertions(+) create mode 100644 docs/source/plone-keywords/generic.rst diff --git a/docs/source/plone-keywords/generic.rst b/docs/source/plone-keywords/generic.rst new file mode 100644 index 0000000..ddd04c6 --- /dev/null +++ b/docs/source/plone-keywords/generic.rst @@ -0,0 +1,16 @@ +================ +Generic Keywords +================ + +Remove line from textarea +========================= +:: + + Remove line from textarea + [arguments] ${fieldName} ${value} + +Example:: + + Remove '${tag}' from the valid tags list + Remove line from textarea form.widgets.valid_tags ${tag} + diff --git a/docs/source/plone-keywords/index.rst b/docs/source/plone-keywords/index.rst index 9c51691..c7fedea 100644 --- a/docs/source/plone-keywords/index.rst +++ b/docs/source/plone-keywords/index.rst @@ -10,6 +10,7 @@ all the keywords that are necessary to write acceptance test in Plone. :maxdepth: 1 content.rst + generic.rst browser.rst login.rst history.rst diff --git a/src/plone/app/robotframework/keywords.robot b/src/plone/app/robotframework/keywords.robot index efbd616..7c6b8b5 100644 --- a/src/plone/app/robotframework/keywords.robot +++ b/src/plone/app/robotframework/keywords.robot @@ -322,3 +322,9 @@ Checkbox Select [arguments] ${title} ${for}= Get Element Attribute xpath=//table[contains(@class, 'group')]//label[contains(., "${title}")]@for Select Checkbox id=${for} + +Remove line from textarea + [arguments] ${fieldName} ${value} + ${lines}= Get value name=${fieldName} + ${lines}= Remove String ${lines} ${value}\n + Input Text name=${fieldName} ${lines}