Lucas1
September 24, 2024, 6:00pm
1
Hey, I just wanted to share a simple abstraction I created for driving the WebRTC softphone in my automated UI tests . It isn't anything special but thought someone might find it useful?
I didn't use the Platform API for these as I wanted to keep the test as real to what an agent would do as possible, since my UI also utilises events coming from the Embedded Framework - events I presume are only fired off the back of the softphone - I may be wrong about that.
Genesys Softphone Page Object Model.md
# Genesys WebRTC Softphone Page Object Model
This POM simplifies the process of interacting with Genesys's WebRTC Softphone's UI when working with testing tools like [Puppeteer](https://pptr.dev/). It was created to serve my use-case [that I posted about](https://www.linkedin.com/posts/lucas-woodward-the-dev_genesys-genesyscloud-webrtc-activity-7180853577681117184-ae0R?utm_source=share&utm_medium=member_desktop) but can easily be extended.
Usage example:
```ts
const softphone = await webRtcSoftphone(frame);
const audioInput = await softphone.getAudioInputFromWebRtcSettings();
console.log(`Audio Input: ${audioInput}`);
This file has been truncated. show original
interactionsUi.ts
import { Frame } from "puppeteer";
export async function updateToOnQueue(frame: Frame) {
console.debug("Clicking Status Arrow");
const statusArrow = await frame.waitForSelector("#statusListArrow_test", {
visible: true,
});
await statusArrow.click();
console.debug("Clicking On Queue");
This file has been truncated. show original
navigationUi.ts
import { Frame } from "puppeteer";
export async function clickInteractionsInSettings(frame: Frame) {
console.debug("Clicking Interactions in Navigation");
const interactionsNavItem = await frame.waitForSelector(
"#navInteractionList",
{
visible: true,
},
);
This file has been truncated. show original
There are more than three files. show original
system
Closed
October 24, 2024, 6:01pm
2
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.