1

I am trying to click the place order button. Button code :

<button type="button" data-ng-disabled="activeStep.position !== 6" class="primary-button place-order-btn" data-ng-click="VerifyOrderInformation()">
            Place Order
        </button>

I have tried two methods and both cannot locate the element.

driver.find_element_by_xpath("//*[@id=\"mainContent\"]/aside/div[2]/button").click()

driver.find_element_by_class_name("primary-button place-order-btn").click()

I have a 5 second sleep preceding this string to allow for the page to load and I don't see any frames/iframes

Thanks in advance to any assistance.

1

Did you try:

//button[@data-ng-click="VerifyOrderInformation()"]

you can use any attribute as:

//tagname[@attribute="attribute-value"]

you can have multiple condition as:

//tagname[@attribute="attribute-value" and @attribute2="attribute2-value"]

so:

//button[@data-ng-click="VerifyOrderInformation()" and @class="primary-button place-order-btn"]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.