简体   繁体   中英

Unable to click on an element using codeceptjs

enter image description here I have tried below approaches to click on an element but unable to click and always click in the background of the page:-

Using css:

submitButtonEnabled: { css: 'button.button--enabled[type="submit"]' },
I.click(this.submitButtonEnabled);

Also tried xpath. and

I.click('Submit',this.submitButtonEnabled); or I.click("Submit");

Also tried within keyword like :

within({css:'div.scrollable.panel__scrollable'},()=>{
      I.click('Submit',this.submitButtonEnabled);

}); 

Notes: Its working fine if browser size is not maximized.

I went through the same situation. I used to use xpath this way:

I.click('//button[@type="submit"]');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM