Updated selenium WEB_DRIVER_WAIT, the feature until_when now use a

predicate. Updated the related example.
This commit is contained in:
jvelilla
2013-05-13 10:47:46 -03:00
parent 30663dc9fb
commit e0c3c783fa
3 changed files with 26 additions and 19 deletions

View File

@@ -39,7 +39,7 @@ feature -- Example
-- Google's search is rendered dynamically with JavaScript.
-- Wait for the page to load, timeout after 10 seconds
create wait.make (web_driver,10)
wait.until_when ("Eiffel Room")
wait.until_when (agent expected_title (web_driver, "Eiffel Room"))
if attached web_driver.get_page_tile as l_title then
@@ -49,4 +49,12 @@ feature -- Example
-- close the window
web_driver.window_close
end
expected_title (driver : WEB_DRIVER; title : STRING_32) : BOOLEAN
do
if attached {STRING_32} driver.get_page_tile as l_title and then l_title.has_substring (title) then
Result := True
end
end
end