Testing DataTables with SeleniumIDE

Testing DataTables with SeleniumIDE

LeadVisionaryLeadVisionary Posts: 8Questions: 0Answers: 0
edited October 2010 in General
I've noticed strange behavior with SeleniumIDE 1.0.7 and DataTables 1.4.0 beta 9 (yes this is old. Not sure if this has been fixed by now, as forum shows no posts with Selenium) on Firefox 3.6.10.

When trying to use search textbox, one needs to use the Selenium "type" and "typeKeys" commands to allow the DataTable to catch up to filtered search results (as suggested in the Selenium documentation). This works fine in writing a test on one tab, as the text appears in the textbox only once. But when running the test with another open tab, the text is entered in twice.

Can anyone replicate this? I don't know of sites that use DataTables other than the one I'm testing, so I don't know if it's something application specific or tool specific? If so, do we know what the issue is? Is there a workaround?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Sounds very odd! So you type the text into one text box, and it shows up in the text box in a different tab!? If that's the case, it sounds like a major security hole to me... It's not something DataTables looks at at all (multiple windows) so it shouldn't be any different with the new versions (you could try the table here: http://datatables.net ). Possibly one for the SeleniumIDE people.

    Allan
  • LeadVisionaryLeadVisionary Posts: 8Questions: 0Answers: 0
    Not exactly. Seeing an issue with an instance of Firefox with one tab, A and the commands

    type //input[@value=''] blah
    typeKeys //input[@value=''] blah

    where the text would be written once in the search box of that tab, but when tab B was opened and the test was run, it would be written twice in the input of that tab. I can't seem to replicate it now with a simpler base case, though, so it may have just been "strange, middle of the night behavior."

    ...though i would suggest that attaching an id to that textbox (i.e. "search_box") and making it an exposed, user-configurable property would be a useful modification.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Heh - things go bump in the night...

    DataTabels will attach "{table_id}_filter" as the ID for the DIV in which the input is (if your table has an ID). So you can do $('example_filter input') for example to get the input element.

    Allan
This discussion has been closed.