codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS
http://codecept.io
MIT License
4.1k stars 724 forks source link

I.fillField fails occasionally when form is in bootstrap modal #2298

Closed ayrshid99 closed 4 years ago

ayrshid99 commented 4 years ago

i try to fill the form which is inside bootstrap 4 modal

some times the part of string is truncated or sometimes its sent as empty string to the field.

Provide console output if related. Use --verbose mode for more details.

kobenguyent commented 4 years ago

@ayrshid99 you can try to use I.type()

ayrshid99 commented 4 years ago

@PeterNgTr can you provide an example how to use this. it seems it only takes string to be types as argument without any locator.

kobenguyent commented 4 years ago

hey @ayrshid99, I think you can try to use I.click(element) to focus on it and then I.type to type the thing you want.

ayrshid99 commented 4 years ago

@PeterNgTr i tried this but the problem persists

ayrshid99 commented 4 years ago

i finally figured it out , it was happening because of animation i had to add implicit wait and let the animation finish.

aesyondu commented 3 years ago

i finally figured it out , it was happening because of animation i had to add implicit wait and let the animation finish.

Yep, same applies to sweetalert, I had to add wait(1) so that the javascript click listeners will be attached.