I am attempting to automate MDLQA-1791 as per this tracker issue. This needs a step where editing is turned off for a created book and I need to check that the edit, delete, hide and add new links (images) are removed after that. I attempted to use
Then "Edit chapter \"1 My first chapter\"" "link" in the "Table of contents" "block" should not be visible
but it gave me an error
Link matching locator "Edit chapter "1 My first chapter"" in the "Table of contents" "block"" not found.
I believe that this is due to the fact that the element needs to be present but hidden in order for the above test step to work. However, in this case the element is completely removed from the page.
Is there a better way to write this test step?