diff --git a/library/test/selenium/examples/application.e b/library/test/selenium/examples/application.e deleted file mode 100644 index d3177d6f..00000000 --- a/library/test/selenium/examples/application.e +++ /dev/null @@ -1,32 +0,0 @@ -note - description : "project application root class" - date : "$Date$" - revision : "$Revision$" - -class - APPLICATION - -inherit - ARGUMENTS - -create - make - -feature {NONE} -- Initialization - - make - -- Run application. - do - execute_search - end - - execute_example1 - do - (create {EXAMPLE_1}).test - end - - execute_search - do - (create {EXAMPLE_SEARCH}).search - end -end diff --git a/library/test/selenium/examples/example_1.e b/library/test/selenium/examples/example_1.e deleted file mode 100644 index 9efa3bce..00000000 --- a/library/test/selenium/examples/example_1.e +++ /dev/null @@ -1,58 +0,0 @@ -note - description: "Summary description for {EXAMPLE_1}." - author: "" - date: "$Date$" - revision: "$Revision$" - -class - EXAMPLE_1 - -feature -- Access - test - local - web_driver: SE_JSON_WIRE_PROTOCOL - capabilities: SE_CAPABILITIES - l_session : detachable SE_SESSION - do - create web_driver.make - if attached web_driver.status as l_status then - create capabilities.make - capabilities.set_browser_name ("chrome") - l_session:= web_driver.create_session_with_desired_capabilities (capabilities) - if attached l_session as l_s then - - -- navigate to www.google.com - web_driver.navigate_to_url (l_s.session_id, "http://www.google.com/") - - -- Find the text input element by its name - if attached {WEB_ELEMENT} web_driver.search_element (l_s.session_id, (create {SE_BY}).name ("q")) as l_element then - -- search something - web_driver.send_event(l_s.session_id, l_element.element,<<"Eiffel Room">>) - - -- Submit Form - web_driver.element_submit (l_s.session_id, l_element.element) - - if attached web_driver.page_title (l_s.session_id) as l_page then - print ("Page Name" + l_page) - end - end - end - - end - end - --- // And now use this to visit Google --- driver.get("http://www.google.com"); - --- // Find the text input element by its name --- WebElement element = driver.findElement(By.name("q")); - --- // Enter something to search for --- element.sendKeys("Cheese!"); - --- // Now submit the form. WebDriver will find the form for us from the element --- element.submit(); - --- // Check the title of the page --- System.out.println("Page title is: " + driver.getTitle()); -end diff --git a/library/test/selenium/examples/example_search.e b/library/test/selenium/examples/example_search.e deleted file mode 100644 index 3a42d4f3..00000000 --- a/library/test/selenium/examples/example_search.e +++ /dev/null @@ -1,72 +0,0 @@ -note - description: "Summary description for {EXAMPLE_SEARCH}." - author: "" - date: "$Date$" - revision: "$Revision$" - -class - EXAMPLE_SEARCH - -inherit - - ANY - redefine - default_create - end - -feature - - default_create - do - search - end - -feature -- Example - - search - local - web_driver: WEB_DRIVER - wait: WEB_DRIVER_WAIT - do - --Create a new instance of a Web driver - create web_driver.make - - -- Start session with chrome - web_driver.start_session_chrome - - -- Go to Google - web_driver.to_url ("http://www.google.com/") - - -- Find the text input element by its name - if attached web_driver.find_element ((create {SE_BY}).name ("q")) as l_element then - - -- Enter something to search for - l_element.send_keys (<<"Eiffel Room">>) - - -- Now submit the form. WebDriver will find the form for us from the element - l_element.submit - end - if attached web_driver.get_page_tile as l_title then - print ("%NPage title is:" + l_title) - end - - -- 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 (agent expected_title(web_driver, "Eiffel Room")) - if attached web_driver.get_page_tile as l_title then - print ("%NPage title is:" + l_title) - end - - -- 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 diff --git a/library/test/selenium/examples/examples.ecf b/library/test/selenium/examples/examples.ecf deleted file mode 100644 index 60cf73e9..00000000 --- a/library/test/selenium/examples/examples.ecf +++ /dev/null @@ -1,63 +0,0 @@ - - - - - /.git$ - /EIFGENs$ - /CVS$ - /.svn$ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/library/test/selenium/examples/find_element_child.e b/library/test/selenium/examples/find_element_child.e deleted file mode 100644 index 67e32b06..00000000 --- a/library/test/selenium/examples/find_element_child.e +++ /dev/null @@ -1,61 +0,0 @@ -note - description: "The WEB_ELEMENT class also supports find methods that find child elements." - -class - FIND_ELEMENT_CHILD - -inherit - - ANY - redefine - default_create - end - -create - default_create - -feature - - default_create - do - search - end - -feature -- Search by id - - search - local - web_driver: WEB_DRIVER - wait: WEB_DRIVER_WAIT - do - --Create a new instance of a Web driver - create web_driver.make - - -- Start session with chrome - web_driver.start_session_chrome - - -- Go to EiffelRoom login page - web_driver.to_url ("http://www.eiffelroom.com/") - - -- Find the element div with id page,and then we can find a child element div page-inner - --
- --
- -- - --
- --