If you have now way of knowing whether any particular row should or should not have a delete row in it how can you possibly test this aspect of the application?
Ok, if there is a delete button in the row, you can click on it and test that there are one fewer rows, perthaps.
But should clicking the delete button delete the row, or just delete somehting else and leave the row in place, and remove the delete button?
And what if there is not a delete button on a particular row ... is that correct or not? Maybe the the item in question has been deleted already?
You need to go back to the design specification, which should have a section somwhere telling you the criteria for whether a particular row on your table should or should not have a delete button. That will be the algorithm that you need to use here, firstly to test whether a delete button should exist, or not , then to check whether it performs as expected. No one here can tell you what it is. And not knowing it is why for every suggestion you have received you come back saying ... "Yes, but ..."
If you are not writing your tests based on the design specification, you are not testing it, you are just automating it, which is a different thing, and not, it seems what you want to do.
Peter
Date: Fri, 21 Sep 2012 00:09:46 -0700
From:
erwing...@googlemail.comTo:
seleniu...@googlegroups.comSubject: [selenium-users] Re: How can I get the value of the title attribute of a web element?
That is the point. Like I said before I can not be sure that every row has e.g. a delete button. There are users which I can not delete. Next I will try the brute force method of Kart.
I actually did not expect that finding a solution would be so difficult...