From 5a6735c27302bd89ad943728dafda3e72c8769e4 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Fri, 9 Jun 2023 15:15:41 -0400
Subject: [PATCH 01/21] Sketching out initial ideas for test suite on expected
conditions
---
atest/acceptance/expected_conditions.robot | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 atest/acceptance/expected_conditions.robot
diff --git a/atest/acceptance/expected_conditions.robot b/atest/acceptance/expected_conditions.robot
new file mode 100644
index 000000000..06c471857
--- /dev/null
+++ b/atest/acceptance/expected_conditions.robot
@@ -0,0 +1,34 @@
+*** Test Cases ***
+# Wait Until Element State Is (Not)
+# Get Element State
+# Element States Should (Not) Be
+
+Check waiting for condition that takes a element
+ Fail
+
+Check waiting for condition that takes a title
+ Fail
+
+Check waiting for condition that takes a url
+ Fail
+ Wait Until url contains google
+ # verify took 2 seconds
+
+Check waiting for condition that takes locator and string
+ Wait Until Element State Is ${condition} ${locator} ${string}
+ Wait Until Element State Is ${condition} ${element}
+ Wait Until Condition Is ${condition} ${target}
+ Wait Until Condition Is ${condition} ${whatelse you need for this condition}
+
+
+ Wait Until State Is number_of_windows_to_be
+ Wait Until Expected Condition Is number_of_windows_to_be
+ Wait Until Condition Is number of windows to be 5
+ Wait Until Condition Is text to be present in element attribute //some/xpath/to/an/element href http://hello
+
+ Wait Until Condition Is number of windows to be 5 text to be present in element attribute //some/xpath/to/an/element href http://hello
+
+ Wait Until number of windows to be 5
+ Wait Until text to be present in element attribute //some/xpath/to/an/element href http://hello
+ Get Condition
+ Is number of windows to be 5
\ No newline at end of file
From 583c9e600378c716a64361ac783b52f74286c3c2 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Fri, 10 Nov 2023 20:29:33 -0500
Subject: [PATCH 02/21] Added dynamic and delayed title change as initial test
framework for expected conditions
---
atest/resources/html/javascript/dynamic_content.html | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/atest/resources/html/javascript/dynamic_content.html b/atest/resources/html/javascript/dynamic_content.html
index 284d5d4ee..8c602cd64 100644
--- a/atest/resources/html/javascript/dynamic_content.html
+++ b/atest/resources/html/javascript/dynamic_content.html
@@ -10,10 +10,17 @@
container = document.getElementById(target_container);
container.appendChild(p);
}
+
+ function delayed_title_change() {
+ setTimeout(function(){
+ document.title='Delayed';
+ },600);
+ }
change title
+ delayed change title add content title to ääää
From 2b10abf0c9cdd7596ebaf17bfff0937b75e729c3 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Fri, 10 Nov 2023 22:12:10 -0500
Subject: [PATCH 03/21] Initial (working) prototype of wait for.. keyword
Wanted to just throw out a sample test case, test application (page),
and a working keyword. Interesting this works at a very basic level. See
next paths for a few functionality like
- instead of snake_case create method for using "space case"
- add check for presence of method
- add polling delay, timeout
- ...?
---
.../keywords/expected_conditions.robot | 11 ++++++++
src/SeleniumLibrary/__init__.py | 2 ++
src/SeleniumLibrary/keywords/__init__.py | 1 +
.../keywords/expectedconditions.py | 25 +++++++++++++++++++
4 files changed, 39 insertions(+)
create mode 100644 atest/acceptance/keywords/expected_conditions.robot
create mode 100644 src/SeleniumLibrary/keywords/expectedconditions.py
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
new file mode 100644
index 000000000..05a6496ab
--- /dev/null
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -0,0 +1,11 @@
+*** Settings ***
+Test Setup Go To Page "javascript/dynamic_content.html"
+Resource ../resource.robot
+
+*** Test Cases ***
+Wait For Expected Conditions One Argument
+ Title Should Be Original
+ Click Element link=delayed change title
+ Wait For Expected Condition title_is Delayed
+ Title Should Be Delayed
+
diff --git a/src/SeleniumLibrary/__init__.py b/src/SeleniumLibrary/__init__.py
index 5754cb0f0..3b781725d 100644
--- a/src/SeleniumLibrary/__init__.py
+++ b/src/SeleniumLibrary/__init__.py
@@ -35,6 +35,7 @@
BrowserManagementKeywords,
CookieKeywords,
ElementKeywords,
+ ExpectedConditionKeywords,
FormElementKeywords,
FrameKeywords,
JavaScriptKeywords,
@@ -490,6 +491,7 @@ def __init__(
BrowserManagementKeywords(self),
CookieKeywords(self),
ElementKeywords(self),
+ ExpectedConditionKeywords(self),
FormElementKeywords(self),
FrameKeywords(self),
JavaScriptKeywords(self),
diff --git a/src/SeleniumLibrary/keywords/__init__.py b/src/SeleniumLibrary/keywords/__init__.py
index 184efff14..fc9f357cf 100644
--- a/src/SeleniumLibrary/keywords/__init__.py
+++ b/src/SeleniumLibrary/keywords/__init__.py
@@ -18,6 +18,7 @@
from .browsermanagement import BrowserManagementKeywords # noqa
from .cookie import CookieKeywords # noqa
from .element import ElementKeywords # noqa
+from .expectedconditions import ExpectedConditionKeywords # noqa
from .formelement import FormElementKeywords # noqa
from .frames import FrameKeywords # noqa
from .javascript import JavaScriptKeywords # noqa
diff --git a/src/SeleniumLibrary/keywords/expectedconditions.py b/src/SeleniumLibrary/keywords/expectedconditions.py
new file mode 100644
index 000000000..fed8cfe21
--- /dev/null
+++ b/src/SeleniumLibrary/keywords/expectedconditions.py
@@ -0,0 +1,25 @@
+# Copyright 2016- Robot Framework Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from SeleniumLibrary.base import LibraryComponent, keyword
+from selenium.webdriver.support.wait import WebDriverWait
+from selenium.webdriver.support import expected_conditions as EC
+
+class ExpectedConditionKeywords(LibraryComponent):
+ @keyword
+ def wait_for_expected_condition(self, condition, *args):
+ wait = WebDriverWait(self.driver, 10)
+ # import sys,pdb;pdb.Pdb(stdout=sys.__stdout__).set_trace()
+ c = getattr(EC, condition)
+ wait.until(c(*args))
\ No newline at end of file
From eb49c98fc7d13b813752c56a47b0b526702bf5c6 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Fri, 10 Nov 2023 22:38:26 -0500
Subject: [PATCH 04/21] Bumped number of library keywords by one
---
utest/test/api/test_plugins.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utest/test/api/test_plugins.py b/utest/test/api/test_plugins.py
index 89e33c247..9b5a34f44 100644
--- a/utest/test/api/test_plugins.py
+++ b/utest/test/api/test_plugins.py
@@ -22,7 +22,7 @@ def setUpClass(cls):
def test_no_libraries(self):
for item in [None, "None", ""]:
sl = SeleniumLibrary(plugins=item)
- self.assertEqual(len(sl.get_keyword_names()), 177)
+ self.assertEqual(len(sl.get_keyword_names()), 178)
def test_parse_library(self):
plugin = "path.to.MyLibrary"
From 129e9b03e96556dc827a57e2e7ffe36f0c2f6842 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Fri, 10 Nov 2023 22:41:52 -0500
Subject: [PATCH 05/21] Moved previous expected condition tests out of current
test suite
These were some initial sketches for the keywords and their usage. As
they are not working I have moved them out of the test suite.
---
...ected_conditions.robot => expected_conditions.robot.PROTOTYPE} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename atest/acceptance/{expected_conditions.robot => expected_conditions.robot.PROTOTYPE} (100%)
diff --git a/atest/acceptance/expected_conditions.robot b/atest/acceptance/expected_conditions.robot.PROTOTYPE
similarity index 100%
rename from atest/acceptance/expected_conditions.robot
rename to atest/acceptance/expected_conditions.robot.PROTOTYPE
From 36e7da3832eb059cfbcac12cae45f2a2302bba5f Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Sat, 11 Nov 2023 08:13:46 -0500
Subject: [PATCH 06/21] Adding another sample tests and modifying keyword
behavior
- Added 100 millisecond polling to wait. Seems like a good default. Will
need to decide on how to let users set this.
- Copied dynamic_content.html making into seperate
expected_conditions.html test page.
- Added another sample test case
---
.../keywords/expected_conditions.robot | 8 ++-
.../html/javascript/expected_conditions.html | 72 +++++++++++++++++++
.../keywords/expectedconditions.py | 2 +-
3 files changed, 79 insertions(+), 3 deletions(-)
create mode 100644 atest/resources/html/javascript/expected_conditions.html
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
index 05a6496ab..b032aa7cd 100644
--- a/atest/acceptance/keywords/expected_conditions.robot
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -1,5 +1,5 @@
*** Settings ***
-Test Setup Go To Page "javascript/dynamic_content.html"
+Test Setup Go To Page "javascript/expected_conditions.html"
Resource ../resource.robot
*** Test Cases ***
@@ -8,4 +8,8 @@ Wait For Expected Conditions One Argument
Click Element link=delayed change title
Wait For Expected Condition title_is Delayed
Title Should Be Delayed
-
+
+Wait For Expected Conditions using WebElement as locator
+ Click Button Change the button state
+ ${dynamic_btn}= Get WebElement id:enabledDisabledBtn
+ Wait For Expected Condition element_to_be_clickable ${dynamic_btn}
diff --git a/atest/resources/html/javascript/expected_conditions.html b/atest/resources/html/javascript/expected_conditions.html
new file mode 100644
index 000000000..9e2a38f39
--- /dev/null
+++ b/atest/resources/html/javascript/expected_conditions.html
@@ -0,0 +1,72 @@
+
+
+
+
+ Original
+
+
+
+ change title
+ delayed change title
+ add content
+ title to ääää
+
+ Change Title
+ Add Content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SeleniumLibrary/keywords/expectedconditions.py b/src/SeleniumLibrary/keywords/expectedconditions.py
index fed8cfe21..94ce5da50 100644
--- a/src/SeleniumLibrary/keywords/expectedconditions.py
+++ b/src/SeleniumLibrary/keywords/expectedconditions.py
@@ -19,7 +19,7 @@
class ExpectedConditionKeywords(LibraryComponent):
@keyword
def wait_for_expected_condition(self, condition, *args):
- wait = WebDriverWait(self.driver, 10)
+ wait = WebDriverWait(self.driver, 10, 0.1)
# import sys,pdb;pdb.Pdb(stdout=sys.__stdout__).set_trace()
c = getattr(EC, condition)
wait.until(c(*args))
\ No newline at end of file
From 48376f707985a9be74b821e1440fa8c62acec4d9 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Sat, 11 Nov 2023 08:28:55 -0500
Subject: [PATCH 07/21] Added sample test case where an expected timeout would
occur
---
atest/acceptance/keywords/expected_conditions.robot | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
index b032aa7cd..a09283d2b 100644
--- a/atest/acceptance/keywords/expected_conditions.robot
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -9,6 +9,12 @@ Wait For Expected Conditions One Argument
Wait For Expected Condition title_is Delayed
Title Should Be Delayed
+Wait For Expected Condition Times out
+ Title Should Be Original
+ Click Element link=delayed change title
+ Wait For Expected Condition title_is Foo
+ # Verify failure
+
Wait For Expected Conditions using WebElement as locator
Click Button Change the button state
${dynamic_btn}= Get WebElement id:enabledDisabledBtn
From 30834595a95658f967f0f20ffdfca7f8902e102d Mon Sep 17 00:00:00 2001
From: Yuri Verweij
Date: Wed, 15 Nov 2023 12:04:15 +0100
Subject: [PATCH 08/21] added timeout argument to keyword
wait_for_expected_condition Added timeout atest
---
atest/acceptance/keywords/expected_conditions.robot | 6 +++---
src/SeleniumLibrary/keywords/expectedconditions.py | 9 ++++++---
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
index a09283d2b..f66f08e8c 100644
--- a/atest/acceptance/keywords/expected_conditions.robot
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -9,11 +9,11 @@ Wait For Expected Conditions One Argument
Wait For Expected Condition title_is Delayed
Title Should Be Delayed
-Wait For Expected Condition Times out
+Wait For Expected Condition Times out within set timeout
+ [Documentation] FAIL REGEXP: TimeoutException: Message: Expected Condition not met within set timeout of 0.5*
Title Should Be Original
Click Element link=delayed change title
- Wait For Expected Condition title_is Foo
- # Verify failure
+ Wait For Expected Condition title_is Delayed timeout=0.5
Wait For Expected Conditions using WebElement as locator
Click Button Change the button state
diff --git a/src/SeleniumLibrary/keywords/expectedconditions.py b/src/SeleniumLibrary/keywords/expectedconditions.py
index 94ce5da50..19b143b92 100644
--- a/src/SeleniumLibrary/keywords/expectedconditions.py
+++ b/src/SeleniumLibrary/keywords/expectedconditions.py
@@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+import string
+from typing import Optional
from SeleniumLibrary.base import LibraryComponent, keyword
from selenium.webdriver.support.wait import WebDriverWait
@@ -18,8 +20,9 @@
class ExpectedConditionKeywords(LibraryComponent):
@keyword
- def wait_for_expected_condition(self, condition, *args):
- wait = WebDriverWait(self.driver, 10, 0.1)
+ def wait_for_expected_condition(self, condition: string, *args, timeout: Optional[float]=10):
+ wait = WebDriverWait(self.driver, timeout, 0.1)
# import sys,pdb;pdb.Pdb(stdout=sys.__stdout__).set_trace()
c = getattr(EC, condition)
- wait.until(c(*args))
\ No newline at end of file
+ result = wait.until(c(*args), message="Expected Condition not met within set timeout of " + str(timeout))
+ return result
From 98d8f89878bb03432ca1daf08ea0a02c4173d973 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Wed, 22 Nov 2023 09:52:46 -0500
Subject: [PATCH 09/21] Some intial parsing and validation for parsing
condition argument
---
.../keywords/expectedconditions.py | 4 +++
.../test/keywords/test_expectedconditions.py | 31 +++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 utest/test/keywords/test_expectedconditions.py
diff --git a/src/SeleniumLibrary/keywords/expectedconditions.py b/src/SeleniumLibrary/keywords/expectedconditions.py
index 19b143b92..01a426ff8 100644
--- a/src/SeleniumLibrary/keywords/expectedconditions.py
+++ b/src/SeleniumLibrary/keywords/expectedconditions.py
@@ -26,3 +26,7 @@ def wait_for_expected_condition(self, condition: string, *args, timeout: Optiona
c = getattr(EC, condition)
result = wait.until(c(*args), message="Expected Condition not met within set timeout of " + str(timeout))
return result
+
+ def _parse_condition(self, condition: string):
+ parsed = condition.replace(' ','_').lower()
+ return parsed
\ No newline at end of file
diff --git a/utest/test/keywords/test_expectedconditions.py b/utest/test/keywords/test_expectedconditions.py
new file mode 100644
index 000000000..3ade2e5fa
--- /dev/null
+++ b/utest/test/keywords/test_expectedconditions.py
@@ -0,0 +1,31 @@
+import unittest
+
+from SeleniumLibrary.keywords import ExpectedConditionKeywords
+
+# Test cases
+
+# Parsing expected condition
+# expect to match ..
+# element_to_be_clickable
+# Element To Be Clickable
+# eLEment TO be ClIcKable
+# expect to not match ..
+# element__to_be_clickable
+# elementtobeclickable
+# element_to_be_clickble
+# Ice Cream Cone Has Three Scopes
+
+# what about ..?
+# ${ec_var}
+# Element\ To\ Be\ Clickable
+# Element${SPACE}To${SPACE}Be${SPACE}Clickable
+
+class ExpectedConditionKeywords(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ cls.ec_keywords = ExpectedConditionKeywords(None)
+
+ def WorkInProgresstest_parse_condition(self):
+ results = []
+ results.append(self.ec_keywords._parse_condition("Element To Be Clickable"))
+ results.append(self.ec_keywords._parse_condition("eLEment TO be ClIcKable"))
From 7ad5296f47380ecb5a314d4579c381e6bc7e144c Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Thu, 18 Jan 2024 18:51:03 -0500
Subject: [PATCH 10/21] Basic working keyword for wait
Made a few changes ..
- Catch unknown expoected conditions and reopport an error. This can still be improved
by adding a here are the known expected conditions as well as a "did you mean ..."
type message
- Brought in parser so one can use `Element To Be Clickable` instead of
`element_to_be_clicable`. Admittedly it seems to simple and realized an issue, of case,
as I type this.
- Added some test cases
---
.../keywords/expected_conditions.robot | 21 +++++++++++++++++++
src/SeleniumLibrary/errors.py | 4 ++++
.../keywords/expectedconditions.py | 9 ++++++--
3 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
index f66f08e8c..f524b4f8a 100644
--- a/atest/acceptance/keywords/expected_conditions.robot
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -19,3 +19,24 @@ Wait For Expected Conditions using WebElement as locator
Click Button Change the button state
${dynamic_btn}= Get WebElement id:enabledDisabledBtn
Wait For Expected Condition element_to_be_clickable ${dynamic_btn}
+
+Wait For Expected Conditions Where Condition Written With Spaces
+ Title Should Be Original
+ Click Element link=delayed change title
+ Wait For Expected Condition title is Delayed
+ Title Should Be Delayed
+
+Wait For Expected Conditions Where Condition Is Variable
+ ${condition}= Set Variable title is
+ Title Should Be Original
+ Click Element link=delayed change title
+ Wait For Expected Condition ${condition} Delayed
+ Title Should Be Delayed
+
+Wait For Non Existing Expected Conditions
+ Click Button Change the button state
+ ${dynamic_btn}= Get WebElement id:enabledDisabledBtn
+ Run Keyword And Expect Error this_is_not_an_expected_con_dition is an unknown expected condition
+ ... Wait For Expected Condition this_is not an expected con dition ${dynamic_btn}
+
+
diff --git a/src/SeleniumLibrary/errors.py b/src/SeleniumLibrary/errors.py
index 68ed5ab3f..5dd4310d1 100644
--- a/src/SeleniumLibrary/errors.py
+++ b/src/SeleniumLibrary/errors.py
@@ -37,3 +37,7 @@ class NoOpenBrowser(SeleniumLibraryException):
class PluginError(SeleniumLibraryException):
pass
+
+
+class UnkownExpectedCondition(SeleniumLibraryException):
+ pass
\ No newline at end of file
diff --git a/src/SeleniumLibrary/keywords/expectedconditions.py b/src/SeleniumLibrary/keywords/expectedconditions.py
index 01a426ff8..17e23bfa4 100644
--- a/src/SeleniumLibrary/keywords/expectedconditions.py
+++ b/src/SeleniumLibrary/keywords/expectedconditions.py
@@ -15,15 +15,20 @@
from typing import Optional
from SeleniumLibrary.base import LibraryComponent, keyword
+from SeleniumLibrary.errors import UnkownExpectedCondition
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class ExpectedConditionKeywords(LibraryComponent):
@keyword
def wait_for_expected_condition(self, condition: string, *args, timeout: Optional[float]=10):
+ condition = self._parse_condition(condition)
wait = WebDriverWait(self.driver, timeout, 0.1)
- # import sys,pdb;pdb.Pdb(stdout=sys.__stdout__).set_trace()
- c = getattr(EC, condition)
+ try:
+ c = getattr(EC, condition)
+ except:
+ # ToDo: provide hints as to what is avaialbel or find closet match
+ raise UnkownExpectedCondition(f"{condition} is an unknown expected condition")
result = wait.until(c(*args), message="Expected Condition not met within set timeout of " + str(timeout))
return result
From b02203184d0557b2f41dcddd10cc6085f81e3af0 Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Thu, 18 Jan 2024 19:07:27 -0500
Subject: [PATCH 11/21] Added test case for capitals within expected condition
name
Hadn't realized I do force the expected condition ame to all lower case letters. So just needed
to add a test case!
---
atest/acceptance/keywords/expected_conditions.robot | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
index f524b4f8a..c3ec60cb6 100644
--- a/atest/acceptance/keywords/expected_conditions.robot
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -33,6 +33,11 @@ Wait For Expected Conditions Where Condition Is Variable
Wait For Expected Condition ${condition} Delayed
Title Should Be Delayed
+Wait For Expected Conditions Where Condition Is Strange Case
+ Click Button Change the button state
+ ${dynamic_btn}= Get WebElement id:enabledDisabledBtn
+ Wait For Expected Condition EleMENT tO BE cLiCkAbLe ${dynamic_btn}
+
Wait For Non Existing Expected Conditions
Click Button Change the button state
${dynamic_btn}= Get WebElement id:enabledDisabledBtn
From d23700e2ea91325f4fcce3dcf93a0c0d19bdd5ca Mon Sep 17 00:00:00 2001
From: Ed Manlove
Date: Sat, 20 Jan 2024 20:40:59 -0500
Subject: [PATCH 12/21] Added example test where expected condition expected
"locator" tuple
Some of the expected conditions expect a locator which is a tuple
consisting of the By string [1] and the string containing the locator.
I wanted to see what this was like. I am thinking that it would be good
to somehow use the libraries locator strategy.
Needed to also add to the test page so we had a new element after a delay.
[1] https://www.selenium.dev/selenium/docs/api/py/_modules/selenium/webdriver/common/by.html#By
---
.../keywords/expected_conditions.robot | 7 +++++-
.../html/javascript/expected_conditions.html | 23 +++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/atest/acceptance/keywords/expected_conditions.robot b/atest/acceptance/keywords/expected_conditions.robot
index c3ec60cb6..afdc1d1e3 100644
--- a/atest/acceptance/keywords/expected_conditions.robot
+++ b/atest/acceptance/keywords/expected_conditions.robot
@@ -44,4 +44,9 @@ Wait For Non Existing Expected Conditions
Run Keyword And Expect Error this_is_not_an_expected_con_dition is an unknown expected condition
... Wait For Expected Condition this_is not an expected con dition ${dynamic_btn}
-
+Wait For Expected Conditions When Condition Includes Locator
+ Title Should Be Original
+ ${byElem}= Evaluate ("id","added_btn")
+ Click Element link:delayed add element
+ Wait For Expected Condition Presence Of Element Located ${byElem}
+ Click Element id:added_btn
\ No newline at end of file
diff --git a/atest/resources/html/javascript/expected_conditions.html b/atest/resources/html/javascript/expected_conditions.html
index 9e2a38f39..621421e83 100644
--- a/atest/resources/html/javascript/expected_conditions.html
+++ b/atest/resources/html/javascript/expected_conditions.html
@@ -3,6 +3,14 @@
Original
+
+
+
change title delayed change title
+ delayed add element add content title to ääää