New to automation, I have a couple of months under my belt and learning when I have free time.
I'm trying to confirm that a user name appears inside a table and the name will appear on several rows.
I'm using something like this:
@step('Users homepage my lists created by is only user "{username}"')
def step_impl(context, username):
users_name = context.browser.find_elements_by_xpath(
"//*[@id='apollo-table_wrapper']][contains(text(),'%s')]" % username)
I know the xpath is correct for the table but if I want to verify that only a specific username is visible on the screen I'm running into an issue.
In this image below I want to have a test that makes sure only the user of "mike" is present on the page. I will call out "mike" in the feature file...