2

I'm doing SQA work for several Kendo-based sites that have many tables (some are hand-made by our devs). These tables have a lot of rows, columns, pages, and data filled in them- so I'm basically doing SQA on very dynamic content.

I'm trying to make automated scripts to make sure features like add a row or edit a row work but the process seems terribly tedious and prone to failing (not because the actual table code is bad, but because the content is dynamic and thus the Selenium scripts grab the wrong row, column, etc.)

For example, if I want to make a Selenium script for adding a row in a table, I have to:

  • figure out the xPath to that specific table
  • store the Xpath
  • store the XpathCount
  • add a row
  • fill in details
  • get the new XpathCount
  • make sure the new count of rows is 1 more than the original number of rows
  • if all is good so far, get the specific path to the new row and hope that it's where you think it is
  • assert that all of the data of this new row is what was entered on creation of the row

Let's say your table stores things alphabaetically and you can't control all the other tests the devs are running, so its populated with 54 items. You run your Selenium script to click 'Create Row' and then on the 'Create Row' page, it fills in the details for a row with the main attribute name of 'Bob'. Selenium then clicks 'Submit'.

The table/webpage inserts the row 'Bob' between 'BAMF' and 'Karl' but the Selenium test ultimately fails because the content is dynamic and thus it has no clue what row to look for that has 'Bob' in it. If I have to look at the table each time I run a test to see where 'Bob' would go so I can update the script to know where the row will be, I might as well not automate.

Are tests like these not supposed to be automated? Are test scripts like these supposed to only run on empty tables that you populate yourself?

4
  • I would strongly recommend using something other than Selenium IDE personally. By using one of the other frameworks you'd be able to pretty easily iterate over the entire table and find the data you are looking for.
    – Paul Muir
    Commented Sep 2, 2016 at 11:48
  • @PaulMuir Any suggestions?
    – 8protons
    Commented Sep 2, 2016 at 16:00
  • 1
    I would recommend a Selenium 2 solution, preferably using the RemoteWebDriver and the grid. This will require much more of a commitment since there will need to be an entire development process for the automation as well.
    – Paul Muir
    Commented Sep 2, 2016 at 16:19
  • 1
    I've typically been in positions where I get to decide what I use thankfully. In order to convince someone to use a proper automation framework vs a record and playback is whether they want the immediate pay-off of record and playback with minimal reusability/maximum maintenance or long term ROI on a maintainable automation effort.
    – Paul Muir
    Commented Sep 2, 2016 at 17:02

1 Answer 1

2

You can reach same results as with webdriver with Selenium IDE, if you will use Selblocks. This will allow you to use for cycles, conditions, etc... and this will make all that table stuff much easier. You can even read test data from XML. Otherwise I cannot imagine to make it work in Selenium IDE and I would rather recommend webdriver and some programming language.

Disadvantages could be:

  • whole javascript core should be dropped in Selenium 3 coming this winter, so it is not sure what will be with selblocks and when it stops working due to no support for new Firefox versions.
  • Selenium IDE is just for Firefox and with Selblocks you will no multi-browser possibility.
1
  • Thanks for the answer. Selenium 2 seems to be going through some big changes with the whole Marionette Driver thing. I'm just coming into SQA as this is happening so my mind has been blown trying to learn it all haha
    – 8protons
    Commented Sep 2, 2016 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.