diff --git a/library/test/selenium/examples/find_elements_links.e b/library/test/selenium/examples/find_elements_links.e index b0222b7b..cabc3281 100644 --- a/library/test/selenium/examples/find_elements_links.e +++ b/library/test/selenium/examples/find_elements_links.e @@ -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 diff --git a/library/test/selenium/src/protocol/executor/command_executor.e b/library/test/selenium/src/protocol/executor/command_executor.e index 9fd8c9a5..a4b46892 100644 --- a/library/test/selenium/src/protocol/executor/command_executor.e +++ b/library/test/selenium/src/protocol/executor/command_executor.e @@ -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