-1

I need to create simple viber bot. For simplicity, it just checks is the squash court available when I ask(no matter how). After quick search I found two options:

  • Viber API for business which has strange restrictions and you need to be a big company to have access to it.
  • You can "emulate" a user with a real phone and some ui automation tool which is a really strange option(and hard to implement and use)

So, are there any better options to start?

Community
  • 1
  • 1
kharandziuk
  • 12,020
  • 17
  • 63
  • 121
  • 1
    If you can't really use the API you have no other chance other than to "emulate" the user. There are actually UI automation tools that can be set up directly to phone itself (without a phone emulator). For example Ranorex (which license costs but there is a free 1 month trial). I don't believe that Viber has a web interface. But basic automation script ontop of an android emulator is quite simple. – Martin Mar 21 '16 at 09:32
  • Yep, but I expect somebody resolved a similar problem. And maybe help me to find some directions(maybe code samples, or even libraries) and ideas how to maintain this "integration" – kharandziuk Mar 21 '16 at 09:36
  • And the other idea: If I don't find a solution, It doesn't mean that there is no better solution – kharandziuk Mar 21 '16 at 09:39
  • 1
    Not very specific question cause we know nothing about the needs and the current setup. But basically: The solution would consist of 2 basic parts: 1) The emulator (which needs to have Android and Viber installed) 2) the automation tool (eg Ranorex or any other freeware GUI automation tool - a list of free and payed UI testing tools http://www.testingtools.com/mobile-testing/). You set up the automation to automate the steps in the emulator and UI tools usually use quite simple script format with common commands (e.g. swipe, click etc) So the learning curve is small. – Martin Mar 21 '16 at 09:44
  • Did you create something similar? How did you create and API over the Ranorex(I mean something which checks the court availability and puts all the messages from users into db) ? – kharandziuk Mar 21 '16 at 09:54
  • 2
    No I actually haven't made any bots with automation software. I'm just an automation engineer. But you don't have to create an API over Ranorex. The Ranorex itself is the automation container which will run it for you. Basically what you do is automate the user actions (which for you would be swipe action in the emulators Viber app for example). You can take a quick look at this page which explains quite well what Ranorex (and basically any other UI automation tool) actually is and what it's capable of http://www.ranorex.com/support/user-guide-20.html – Martin Mar 21 '16 at 09:57
  • I guess, I understand the idea. I need to create an API which expose the information about a court. And an "application" in ranorex which continuously check user messages in viber account and works with the "court API". I guess it's a valid answer, you can add it and I'll upvote it – kharandziuk Mar 21 '16 at 10:22

1 Answers1

2

You don't have to create an API over Ranorex. The Ranorex itself is the automation container which will run it for you. Basically what you do is automate the user actions (which for you would be swipe action in the emulators Viber app for example). You can take a quick look at this page which explains quite well what Ranorex (and basically any other UI automation tool) actually is and what it's capable of ranorex.com/support/user-guide-20.html

But basically yes the functionality for eg. listening to the incoming messages and acting upon it is in the automation tools logic. I'm not sure what you mean about the API for exposing the information about a court. Ranorex (and other UI auotmation tools) can handle the changes in the applications and get the data from the applications themselves. So it's more like installing an emulator for Android, downloading the Viber app and then automating the user action in the auotmation tool.

Martin
  • 575
  • 6
  • 13