I open two modals in my testing, and I want to be able to click on the \"OK\" button in the second modal (the second selected element in the below html).
My current code
did you try using nth
?
const modalOKButton = Selector('div.ant-modal').nth(1)
.find('div.ant-modal-footer')
.find('button.ant-btn-primary');
or maybe try using selector by aria-labelledby
const modalOKButton = Selector("[aria-labelledby='rcDialogTitle1']")
.find('div.ant-modal-footer')
.find('button.ant-btn-primary');