codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
230 stars 64 forks source link

Ignore upfront messages is not working in webdriverio when getBotMessageDefault() is asynchronous #365

Closed radhabasida closed 4 years ago

radhabasida commented 5 years ago

I am using webricerio connector to on messenger.com. If there are already messages present in FB page and we run the script then script is getting failed. if the getBotMessageDefault() is written using async and await.

So, instead of ignoring messges in BotSays() method, receiveFromBotDefault() method should not be called if ignoreupfrontmesages capabiltity is set to true.

Because, when we run testscript, botium starts to parse bot messages and as soon user send messages, ignorebotmessges is set to false in userSays() method and last message parsed from upfrontmessage is compared with the test script written in text file.

Code is working fine when getBotMessageDefault is not written in async/await.

could you please check the issue.

I have tried to ignore receiveFromBotDefault() when upfrontmessage capabiltiy is true in async/await and it is working fine.

codeforequity-at commented 5 years ago

obviously you analyzed this in detail - can you please prepare a pull request with the suggested bugfix

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

radhabasida commented 4 years ago

I have tried to resolved it in older version, and now in latest version, I need to debug and check for that

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.