Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1) type "india" using typekeys (it is more close to keyboard input)</p> <p>2) WaitForElementPresent ([your xpath][1] or [your xpath] index=1) - include first element of the drop-down list to be sure it exists. Keep in mind that Selenium often runs faster than your application and/or browser so use WaitForElementPresent any time you have something refreshing or loading.</p> <p>3) select your element select [your xpath] index=1</p> <p>But make sure that value entered should result in non-empty list (you may have no "india" records).</p> <p>===================</p> <p>Here is the code you should use (I checked it on my side):</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head profile="http://selenium-ide.openqa.org/profiles/test-case"&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;link rel="selenium.base" href="https://www.google.com.ua/" /&gt; &lt;title&gt;New Test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;table cellpadding="1" cellspacing="1" border="1"&gt; &lt;thead&gt; &lt;tr&gt;&lt;td rowspan="1" colspan="3"&gt;New Test&lt;/td&gt;&lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td&gt;open&lt;/td&gt; &lt;td&gt;/&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;waitForElementPresent&lt;/td&gt; &lt;td&gt;gbqfq&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;type&lt;/td&gt; &lt;td&gt;gbqfq&lt;/td&gt; &lt;td&gt;bitragunta&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;waitForElementPresent&lt;/td&gt; &lt;td&gt;//html/body/div5/table/tbody/tr/td/div&lt;/td&gt; &lt;td&gt;index=1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;mouseOver&lt;/td&gt; &lt;td&gt;//html/body/div5/table/tbody/tr/td/div&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;mouseDown&lt;/td&gt; &lt;td&gt;//html/body/div5/table/tbody/tr/td/div&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/body&gt; </code></pre> <h1> </h1> <p>1) please change in my initial code one line from <code>&lt;link rel="selenium.base" href="https://www.google.com.ua/" /&gt;</code> to <code>&lt;link rel="selenium.base" href="http://maps.google.com/" /&gt;</code> If it does not help, try this:</p> <p>2) try using this locator: //div[@id='hm']/table/tbody/tr/td/div</p> <p>If does not work, then try this</p> <p>3) try execute step by step my script (using menu Actions - Execute this command). And when list is displayed, explore it with Firebug or similar tool to find out its xpath. Maybe Google has different pages for different countries?</p> <p>===================================================</p> <p>1) about error.[error] Element //html/body/div5/table/tbody/tr/td/div not found: this element can be found only when list is expanded (i.e. after you type something in search textbox)</p> <p>2) what do you mean by asking about the right way? Of course I would not advice anything that sounds wrong for me. The only thing you may want to change is to use simpler locator for the list. But try to make it work first.</p> <p>3) What code are you not able to add? Please be more specific.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload