Update readme.md
This commit is contained in:
@@ -26,10 +26,18 @@ The examples and guide are based on http://docs.seleniumhq.org/docs/03_webdriver
|
||||
|
||||
WebDriver is a tool for automating web application testing, and in particular to verify that they work as expected.
|
||||
|
||||
|
||||
class
|
||||
EXAMPLE_SEARCH
|
||||
|
||||
inherit
|
||||
ANY
|
||||
redefine
|
||||
default_create
|
||||
end
|
||||
feature
|
||||
default_create
|
||||
do
|
||||
search
|
||||
end
|
||||
feature -- Example
|
||||
search
|
||||
local
|
||||
@@ -62,7 +70,7 @@ WebDriver is a tool for automating web application testing, and in particular to
|
||||
-- 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
|
||||
@@ -72,7 +80,17 @@ WebDriver is a tool for automating web application testing, and in particular to
|
||||
-- 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
|
||||
|
||||
|
||||
|
||||
|
||||
### Selenium-WebDriver API Commands and Operations
|
||||
|
||||
Reference in New Issue
Block a user