4 Replies Latest reply on Mar 23, 2009 2:42 PM by Nick Belaevski

    SuggestionBox in Selene

    marx3 Apprentice

      How to use SuggestionBox in Selene test? If I simply record test, it writes strictly to inputtext, but nothing is applied on server side, thus validation says that firld is empty. Should I fire any event?

        • 1. Re: SuggestionBox in Selene
          Nick Belaevski Master

          Hello,

          We haven't developed Selenium tests for suggestion box yet. Try to fire keydown/keyup/keypress events.

          • 2. Re: SuggestionBox in Selene
            marx3 Apprentice

            It's rather hard way, because suggestionBox popups a new layer, which cannot be referenced. I would better like to know which event/script to fire to cause assigning value to a field

            • 3. Re: SuggestionBox in Selene
              marx3 Apprentice

              Here is code for people, who want to use SuggestBox in Selenium

              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
              <head profile="http://selenium-ide.openqa.org/profiles/test-case">
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
              <link rel="selenium.base" href="" />
              <title>suggestbox</title>
              </head>
              <body>
              <table cellpadding="1" cellspacing="1" border="1">
              <thead>
              <tr><td rowspan="1" colspan="3">suggestbox</td></tr>
              </thead><tbody>
              <tr>
               <td>type</td>
               <td>form:adresUlica</td>
               <td>UL. KS. STANISĹ´┐ŻAWA KOPERNIKA</td>
              </tr>
              <tr>
               <td>keyDown</td>
               <td>form:adresUlica</td>
               <td>A</td>
              </tr>
              <tr>
               <td>click</td>
               <td>//x:tbody/x:tr[1]</td>
               <td>\13</td>
              </tr>
              <tr>
               <td></td>
               <td></td>
               <td></td>
              </tr>
              
              </tbody></table>
              </body>
              </html>


              • 4. Re: SuggestionBox in Selene
                Nick Belaevski Master

                We've started implementing Selenium tests suite for suggestionbox: https://jira.jboss.org/jira/browse/RF-6237. Results will be committed into SVN soon.