Using JavaScript to open "By View" tab in Recording Analytics

Using this template helps us debug your issues more effectively :slight_smile:

While waiting for feature request (ZOOM-257473, API access to recording analytics), I’m trying develop a workaround using AppleScript and JavaScript.
I want to download the .csv file that contains the information in the “By View” tab. Currently, I can open the page and download the Summary information.
Here’s what works.

# shell command:
# osascript thisScript $UUID
on run argv
	set mydomain to "mydomain"
	set theURL to "https://" & mydomain & ""
	set theClassName to "zm-button__slot"
	set elementnum to 0
	set UUID to item 1 of argv
	tell application "Safari"
		tell application "Safari" to open location theURL & UUID
		-- Login function omitted from example
	end tell
	clickClassName("zm-button--link", 0)
end run
to clickClassName(myClassName, elementnum)
	tell application "Safari"
		do JavaScript "document.getElementsByClassName('" & myClassName & "')[" & elementnum & "].click();" in document 1
	end tell
end clickClassName

I’ve not been able to figure out a way to click on the By View tab and then on the Export as CSV file link. I’d appreciate any guidance.

**Screenshots **

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.