星期一, 8月 30, 2021
星期三, 8月 25, 2021
[Eggplant Functional] SenseTalk: 將Excel透過Database的方式來操作
除了透過檔案的方式來操作Excel,也可以將Excel透過Database的形式來操作。
個人更覺得更好操作。
以下範別就是想要把測試案例的結果另外存到一份Excel,這樣long testing就可以比較好撈資料
//連線Excel,開啟唯讀模式
set myExcelDB to {type:"excel", file:excelPath, writable: Yes}
//sheet name當table name
put table worksheet of myExcelDB into sheetTable
//建立要寫入的物件
put the date into currentDateObj
put {TEST_CASE:testcase, DATA_JSON:valueWithJSONString,DATE:currentDateObj} into testresult
//寫入一列
add record testresult to table worksheet of myExcelDB
星期六, 8月 21, 2021
GA4-差異心得
如何選擇GA4?
可以同時安裝GA3與GA4
07: gtag('config', '<特定資源 ID GA3>');
09: gtag('config', '<特定資源 ID GA4>');
- 通用 Analytics (分析) 資源 (「UA-XXXXXXXX」)、
- Google Analytics (分析) 4 資源 (「G-XXXXXXXX」)、
- Google Ads (「AW-XXXXXXXX」) 及
- Floodlight (「DC-XXXXXXXX」)。
星期六, 8月 07, 2021
[Eggplant] SenseTalk JSON資料操作
JSON已經是普遍的資料交換標準,可以簡單跟不同程式間作為溝通的橋樑。
SenseTalk提供JSONFormat/JSONValue二個方法來讓用戶使用
JSONValue
將json string轉換到json object於sensetalk使用
PS:要注意json字串要有雙引號,否則會解析錯誤
MockDataFromExcel "PM","ETS_PM_0008"
put the result into mockTicket
log mockTicket
put JSONValue(mockTicket) into ticketInfoWithJSON
log ticketInfoWithJSON's reserveNo
2021/8/8, 2:36:12 PM Log {"carType":"標準車廂", "count":"1", "date":"2021/07/30", "depature":"14:46", "end":"台中", "full":1, "fullSubTotal":"700", "no":"651", "reserveNo":"06264014", "seat":"window", "start":"台北", "subTotal":"TWD 700", "trainTimeType":">60", "type":"單程"}
2021/8/8, 2:36:12 PM Log 06264014
JSONFormat
put JSONFormat(ticketInfoWithJSON) into ticketInfoWithJSONString
log ticketInfoWithJSONString
當然也可以在把json object轉回string回存,中文也可以正常編碼
2021/8/8, 2:36:17 PM Log {
"carType": "\u6a19\u6e96\u8eca\u5ec2",
"count": "1",
"date": "2021/07/30",
"depature": "14:46",
"end": "\u53f0\u4e2d",
"full": 1,
"fullSubTotal": "700",
"no": "651",
"reserveNo": "06264014",
"seat": "window",
"start": "\u53f0\u5317",
"subTotal": "TWD 700",
"trainTimeType": ">60",
"type": "\u55ae\u7a0b"
}
星期三, 8月 04, 2021
[Angular] FB CAPI 轉換API串接
REF:
https://fixel.ai/blog/creating-a-simple-conversions-api-for-your-facebook-pixel-events/
https://github.com/facebook/facebook-php-business-sdk?fbclid=IwAR3668-yTjcGQ_wr3Ewd1O3o7tWmW1rvwBM68O2uZ-4hWR-EAfX9IQN99Mk
https://developers.facebook.com/docs/marketing-api/conversions-api
[CSS] 純CSS- 背景漸變效果linear-gradient實做表格中的對角線(diagonal)效果
Naveno Cendikiawan
https://codepen.io/navenoc13/pen/YzpXrOg