Update find element examples.

Improved command executor
This commit is contained in:
jvelilla
2013-05-20 10:46:06 -03:00
parent 47da8c17ea
commit a6cad7e811
2 changed files with 10 additions and 10 deletions

View File

@@ -44,7 +44,7 @@ feature -- Search by id
-- Find links
if attached {ARRAYED_LIST[WEB_ELEMENT]}web_driver.find_elements ((create {SE_BY}).tag_name("a")) as l_links then
if attached web_driver.find_elements ((create {SE_BY}).tag_name("a")) as l_links then
from
l_links.start
until
@@ -62,4 +62,11 @@ feature -- Search by id
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

View File

@@ -29,6 +29,7 @@ feature -- Initialization
host := a_host
create h.make
http_session := h.new_session (a_host)
http_session.set_timeout (5)
-- http_session.set_is_debug (True)
-- http_session.set_proxy ("127.0.0.1", 8888)
end
@@ -61,12 +62,8 @@ feature -- Commands
do
create Result.make_empty
resp := execute_post (cmd_new_session, capabilities)
-- TODO move this scenario to feature new_response
if not (resp.status >= 400) then
if attached resp.header ("Location") as l_location then
resp := http_session.get (l_location.substring ((host.count+1),l_location.count), context_executor)
Result := new_response ("", resp)
end
Result := new_response ("", resp)
else
Result := new_response ("", resp)
end
@@ -815,8 +812,6 @@ feature -- Commands
touch_scroll (a_session_id: STRING_32; data : STRING_32) : SE_RESPONSE
require
selinum_server_available: is_available
local
resp: HTTP_CLIENT_RESPONSE
do
Result := start_touch_scroll (a_session_id, data)
end
@@ -856,8 +851,6 @@ feature -- Commands
touch_flick (a_session_id: STRING_32; data : STRING_32) : SE_RESPONSE
require
selinum_server_available: is_available
local
resp: HTTP_CLIENT_RESPONSE
do
Result := start_touch_flick (a_session_id, data)
end