New
Switch automation traffic to internal
Hi,
I'm still getting familiar with FullStory, and I'm currently automating using webdriverio for a mobile app that has FullStory in it. From a testing standpoint, I'd like to redirect traffic for automation to our internal organization. I found a snippet from the Settings for switching organizations, but I'm struggling to implement it successfully. I've tried adding the snippet in the BeforeSession hook of my wdio.conf.ts file, like this:
export async function FSSwitch(orgId: string, apiKey: string) {
const snippet = `
window['_fs_host'] = 'fullstory.com';
window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
window['_fs_org'] = '${orgId}';
window['_fs_namespace'] = 'FS';
window['_fs_api'] = '${apiKey}';
!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){
return!(h in m).....)}(window,document,window._fs_namespace,"script",window._fs_script);
`;
try {
browser.execute(snippet);
} catch (error) {
console.log(" Scripterror:", await error);
}
};
Unfortunately, it doesn't seem to switch. Could you please guide me on how to achieve this using the correct approach? Thanks!
0
Comments
1 comment
Hey @Visakh ! Thanks so much for reaching out and welcome to the Community! 😁
This type of question would be best answered by our amazing support team directly, so I’ve gone ahead and created a ticket on your behalf. They’ll be reaching out to you soon and will likely ask you to share more information to help troubleshoot.
Please don’t hesitate to reach out should you have any other questions!
Please sign in to leave a comment.