0

I try to check the sending tweets (twitter.com) using seleniumIDE, but I ran into a problem. Textbox for tweets - div element. SeleniumIDE allows to write text only into input element? I tried to use the type id=tweet-box-home-timeline test tweet command, but it does not work. Which command should I use to write text into a div? enter image description here

enter image description here

HelterShelter
  • 171
  • 2
  • 11

3 Answers3

1

The below is working for me. This is after you have logged in.

<tr>
     <td>clickAt</td>
     <td>xpath=(//div[@id='tweet-box-home-timeline'])</td>
     <td></td>
</tr>
<tr>
     <td>storeEval</td>
     <td>selenium.browserbot.findElement(&quot;tweet-box-home-timeline&quot;).innerHTML='The Lord is my shepherd I shall not want he leads me';</td>
     <td>myval</td>
</tr>
<tr>
      <td>click</td>
      <td>xpath=(//button[@class='btn primary-btn tweet-action tweet-btn js-tweet-btn'])</td>
<td></td>
</tr>
Cinu
  • 11
  • 2
0

Best I could manage was manipulating it via java script:

document.getElementById("tweet-box-home-timeline").innerHTML='abc';
DMart
  • 2,401
  • 1
  • 14
  • 19
  • http://stackoverflow.com/questions/23775924/selenium-enter-the-text-in-div-using-xpath seems to indicate that sendKeys will only work with input box... – DMart Apr 07 '15 at 21:17
-1

You better use Java, Selenium IDE isn't useful tool. I've tested Selenium IDE with twitter fields, unfortunately it doesn't work.

It works for me:

    driver.get("https://twitter.com/");
    driver.findElement(By.id("signin-email")).sendKeys("YOUR LOGIN");
    driver.findElement(By.id("signin-password")).sendKeys("YOUR PASSWORD");
    driver.findElement(By.xpath("//button[@class='submit btn primary-btn flex-table-btn js-submit']")).click();
    driver.findElement(By.id("tweet-box-home-timeline")).sendKeys("Test");

Give it a try.

vdmytsyk
  • 187
  • 10
  • While it's true that java implementation of webdriver does give the user a lot more control to call the IDE not useful is just an inflammatory statement. – DMart Apr 07 '15 at 14:14