# -*- coding: utf-8 -*- from lettuce import step, world @step(u'.*I should see active a "([^"]*)" button') def i_should_see_active_a_status_button(step, status): browser = world.browser xpath = "/html/body/div/div[2]/div/table/tbody/tr[1]/td[4]/a" element = browser.find_by_xpath(xpath).first assert not element.has_class('disabled')