Hello,
There is no short answer to your question.
The Genesys Desktop is leveraging our Genesys Cloud Platform API at 95%.
I mean 95% of the API requests it is using are available in the public Platform API.
Some features are using internal/non-public one, but I think they would not be needed in your scenario.
Now, before giving more details on the API, there is one thing to understand regarding Genesys Cloud and that relates to automation of tests.
Access to the Platform API (like when using the Genesys Desktop) is allowed after being authenticated and authorized - Genesys Cloud supports a set of OAuth2 flows.
- Token Implicit Grant, Authorization Code Grant and SAML Bearer are meant for a user authenticating to the platform.
- Client Credentials Grant would be for a server-side application (with no user context).
What is important to know and to understand is that using Client Credentials Grant will not allow you to act on behalf of a user - I mean impersonating a user.
If you need to log a user, make him ready, and have him being able to answer calls/chats, send messages, terminate the session, you must use one of the "user context" OAuth2 methods.
Implicit Grant and Authorization Code grant imply that the user will open a web client (web browser or web component in a C#/Java/... application) and enter his credentials.
If your idea of automation testing was to have a UI less code that connects to Genesys Cloud and act as a user, it won't be possible (that would mean you are using the OAuth2 Client Credentials grant).
Otherwise, if you can have a user perform a login (OAuth2 Implicit Grant or Authorization Code Grant), then yes.
Regarding "1. They are using Selenium Point+Click to launch a client chat window to initiate a conversation from a customer point of view"
You would have to check which version of chat they are using (i.e. Widgets v1 or Widgets v1.1/v2.0).
We have two versions of chat protocol - Chat v1 (Widgets v1) is the legacy one which didn't have a public API (for the guest).
If they are using Chat v2 (Widgets v1.1/v2.0), you can "emulate" the customer side in your test as there is a public API for this - Guest Chat API.
Regarding "2. Then again with Selenium, a test user is logging in to Genesys, seeing this conversation request and clicking on the "Answer" button"
As I explained above, you will need to figure out an approach for the Authentication and Authorization (OAuth2) part.
Then, once you have a token (bearer token), you can invoke the Platform API resources on behalf of this user.
You will need to set your user's presence so that the user is considered as "On Queue" (routing status) [i.e. ready to receive Contact Center interactions].
See here for information on presence: https://developer.genesys.cloud/api/rest/v2/presence/understanding_presence
If you need to be notified about an incoming call to the agent, you will have to leverage the Notifications API (so you can subscribe to certain topics like user's conversations - v2.users.{id}.conversations topic - replacing {id} with the id of the user), get a websocket uri, connect it, and receive notification/events when a call/chat/... is "ringing". As a matter of fact, you will receive events related to this conversation every time the conversation state changes (ringing/answered/ended/...).
See here for information on Notifications API: https://developer.genesys.cloud/api/rest/v2/notifications/
When a conversation reaches the agent, you need to use the Conversations API to answer/accept the chat, or terminate it.
See here for Conversations API: https://developer.genesys.cloud/api/rest/v2/conversations/
If you need to receive chat messages sent by the customer, that would also be via the Notifications API.
And you can use the Platform API to send messages on behalf of the agent.
This page has some info on the Agent Chat API methods: https://developer.genesys.cloud/api/digital/webchat/agentchat
Regarding "3. They are scraping the following view to find the "Customer Details" section on the right side and doing some assertions on the values there. They are also checking the color of the "Troubleshooting" button."
This view is not a native view of the Genesys Desktop - it is a Script.
I mean it is a view which is defined in Genesys Desktop (Admin UI) - but you'll need to understand what they leverage in this page to do the same via API.
See here for some info on Scripts: https://help.mypurecloud.com/articles/about-scripting/
They are probably retrieving participant attributes from the conversation context (that you can get using the Conversations API).
But in a script, you can also invoke Data Actions - which can be a trigger of a Genesys Cloud Platform API method, or a trigger to an external Web Service (or AWS Lambda or Google Cloud function).
You can invoke Data Actions via API as well. I think it is done using the POST /api/v2/integrations/actions/{actionId}/execute in Integrations API
So you'll need to understand where they get the info from (the one you have to check) - conversation context or results from the invocation of a Web Service, or ...
Ex: how the color of the Troubleshooting button is computed in their script.
As there are several API methods involved in such a flow, one thing you can do to understand what's happening, is to check the Network logs in your browser when connecting via the Genesys Desktop. That will probably help understanding in more details what I have described above.
Note that to explore the Platform API, the Notifications events, you can leverage the Developer Tools (API Explorer, Notifications Dev Tool, Web Chat Dev tool) before starting to code.
See here for some info on the Dev Tool: https://developer.genesys.cloud/guides/quickstarts/developer-tools-intro
Regards,