Question

I have created Facebook Test Users using the API. Facebook doesn't allow updates to User profile data, so I created a script for Selenium IDE to log in as each user and update data (work, education, etc.).

Fields which use Facebook's "suggestor" are failing though:

I am able to enter data in the field. I then "click" on the field to give it focus. The "suggestor" appears as expected. I then "click" on the item I want to select in the "suggestor" and nothing happens. Selenium IDE tells me that the click happened, but the Facebook "select" event never seems to fire.

If I manually select with the mouse it works fine. Selenium is waiting for the "suggestion" to be loaded before trying to click on it.

Does anyone know where the "select" event gets attached to the "suggestion?"

type | name=college_name | Wellesley College (enter data)
click | name=college_name | (to make sure field has focus)
waitForElementPresent | xpath=//li[@class='page selected'] | (let "suggestor" populate)
click | xpath=//li[@class='page selected'] (to select item, but nothing happens...)
Was it helpful?

Solution

Rather than "click" on the item in the "suggestor," I instead just sent an "Enter" key, since the correct item was already highlighted. I could have also sent "arrow up/down" keys to highlight the correct item before sending "Enter." This avoids the need to "click" at all. (Not sure you can actually click on something other than a link or button, etc.)

<tr>
    <td>keyPress</td>
    <td>name=college_name</td>
    <td>13</td>
</tr>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top