0

I'm trying to create a script to add domains in bulk inside CloudFlare team.

Here is the draft (obviously I will replace theValue with a list)

set theValue to "cdn.ss.anno.channel4.com"

tell application "Safari" to tell tabs of windows to ¬
    do JavaScript "document.getElementsByClassName('amc alw aet amd du by uy aly alz ama')[0].click();"
delay 0.2


tell application "Safari" to tell tabs of windows to ¬
    do JavaScript "document.getElementsByClassName('ame amf amg amh ami hk amj hm eb oe ee alh jn ef amk aml lu cv jr e wt og sn amm amn ph p amo')[0].value='" & theValue & "';"
delay 1

tell application "Safari" to tell tabs of windows to ¬
    do JavaScript "document.getElementsByClassName('in io ip iq ir is it iu iv iw ix aw iy iz ja aq jb jc jd je jf jg jh ji az jj jk cb jl jm jn b jo at jp jq cv jr e js jt tb hq hr tc ju ac y jv jw jx cm jy cg')[0].click();"
delay 0.2

The script clicks the correct button / fills the correct textfield, but it's seems that the textfield is not sent properly as the page display "source can not be empty"

If I'm using the same data manually it adds the contents of the text field just fine.

You must log in to answer this question.

Browse other questions tagged .