Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Selenium IDE ..

Options
  • 13-07-2011 3:21pm
    #1
    Banned (with Prison Access) Posts: 1,081 ✭✭✭


    Hi,
    Anyone use Selenium IDE plug in for Firefox ?

    It's used for automated testing, I am trying to do simple runs
    and basic stuff like web navigating works ok, but logging into a gmail account and sending an email doesn't work.

    Logging in is ok, it's when I click on an email or "Compose Email" that I get the problem.
    The link below is not found, I think cos Google has the links defined dynamically so it will be different each time
    I have tried to define it different ways, using XPATH's doesn't help either, anyone know another way I can specically
    define a link using frames ?

    5933305115_80cf22619f_b.jpg


Comments

  • Registered Users Posts: 11,262 ✭✭✭✭jester77


    Load gmail using it's HTML view and you'll be OK to go

    open("https://mail.google.com/mail/?ui=html&zy=h")


  • Banned (with Prison Access) Posts: 1,081 ✭✭✭jcf


    Yes it gets to the inbox ok, and is using clickandwait anyway which gives it plenty of time, problem is i dont know how to ID the frame of "Compose Email" .... or an email itself for that matter.


    if I could use the text (Compose Mail or the subject) then i could have a more concrete way of defining the link.


    J


  • Registered Users Posts: 11,262 ✭✭✭✭jester77


    Do you use selenium RC?

    Have a look at Selenium 2 & WebDriver/PageObjects.

    If you use the gmail HTML view link I've posted above then you won't have to worry about dynamically created ids, you can directly open the compose page

    open("?v=b&pv=tl&cs=b")


  • Banned (with Prison Access) Posts: 1,081 ✭✭✭jcf


    Thanks, yeah it works ok when I have gmail set to HTML view.

    cheers


  • Banned (with Prison Access) Posts: 1,081 ✭✭✭jcf


    jester77 wrote: »
    Do you use selenium RC?

    Have a look at Selenium 2 & WebDriver/PageObjects.

    If you use the gmail HTML view link I've posted above then you won't have to worry about dynamically created ids, you can directly open the compose page

    open("?v=b&pv=tl&cs=b")

    I'm not sure, I'm using the IDE plugin for Firefox.

    what exactly are Xpaths ?


  • Advertisement
  • Banned (with Prison Access) Posts: 1,081 ✭✭✭jcf


    None of the tests I do that are on the tutorial page work either - and i do exactly as they do

    http://www.codediesel.com/php/selenium-ide-tutorial-part-2/

    Very frustrating to get this error at the start - [error] Element homepage-searchinput not found


  • Registered Users Posts: 2,904 ✭✭✭cian1500ww


    We use it for testing GWT based websites so it should work with Gmail's Javascript without major issues.
    If you don't mind me asking, what will you be using it for?? It's relatively straight forward to work with, some things like drag and drop can't be automated without thinking outside the box ;)


  • Closed Accounts Posts: 9,139 ✭✭✭-Trek-


    Question_Selenium_IDE____boards.jpg

    You could try slowing it down a bit, I had that problem with elements not found when I was testing it out at first.
    cian1500ww wrote: »
    We use it for testing GWT based websites so it should work with Gmail's Javascript without major issues.
    If you don't mind me asking, what will you be using it for?? It's relatively straight forward to work with, some things like drag and drop can't be automated without thinking outside the box ;)

    Ive found working with Selenium RC requires alot of that :D


  • Registered Users Posts: 1,311 ✭✭✭Procasinator


    Usually, it's possible to select an item by an XPath or even CSS/DOM selectors.

    For instance, in your selectFrame, you are relying on the id/name of the frame. This doesn't work because the name is dynamic. Is this frame always in the same location? For instance, if there is 3 frames, is this frame always the second?

    If so, you can use XPath to select the second frame. Even the CSS-based selectors are quite powerful as, I believe, Selenium has integrated Sizzle library, which jQuery et al use.

    You will have to "think out of the box" as others have said, but it's probably possible. It's frustrating, but that is the nature of screen-scraping (which this kind of task pretty much is).


Advertisement