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?