How to use createHighlight method in qawolf

Best JavaScript code snippet using qawolf

text.js

Source:text.js Github

copy

Full Screen

...79 content: '「就是壓著我們趕快復工。」30歲的均豪(化名),在中國一間供應蘋果手機配件的港商工作。公司在深圳的工廠早在2月17日開工,身為技術經理的他,在彰化老家過完年後,遲遲難以決定該買哪一天的機票回去。',80 }),81 generateContentBlock({82 type: blockTypes.paragraph,83 content: `根據行政院主計處統計,${createHighlight('2018年赴中國大陸工作的台灣人達40萬4千人。')}全台超過40萬的台幹、台商,其中有許多人像均豪一樣,因為中國新冠肺炎疫情,滯留在家,尚未回到工作崗位。`,84 }),85 generateContentBlock({86 type: blockTypes.paragraph,87 content: `企業、工廠急需回穩的人力需求湧現,${createHighlight('許多台幹、台商陷入「保住生命還是保住飯碗」的兩難。')}他們如何在夾縫中抉擇、思考生涯的下一步?`,88 }),89]90const contentSectionOne = [91 generateContentBlock({92 type: blockTypes.backgoundImage,93 backgroundImageSrc: {94 desktop: `${cdnUrlBase}/shenzhen-bg-desktop.jpg`,95 mobile: `${cdnUrlBase}/shenzhen-bg-mobile.jpg`,96 },97 bgCatchPhrases: {98 one: null,99 two: null,100 },101 }),102 generateContentBlock({103 type: blockTypes.headerThree,104 content: '人心惶惶 復工日期一延再延',105 }),106 generateContentBlock({107 type: blockTypes.paragraph,108 content: '「一月底的時候,我就在想怎麼跟公司說要延後回去。」均豪工作的廠區原定2月2日開工,因為疫情未見趨緩,一併延到2月10日,但由於申請復工的企業大排長龍,幾位台灣、香港的幹部順水推舟,建議17日後再開始上班。',109 }),110 generateContentBlock({111 type: blockTypes.paragraph,112 content: `截至3月20日,除了出身湖北的人,多數員工都已回到崗位。即便如此,${createHighlight('能容納兩萬人的廠區,到工人數只有去年同期的八成。')}均豪說,長期以來,廣東有大量來自湖北的移民工,但如今來自疫區者,一律不被任用。`,113 }),114 generateContentBlock({115 type: blockTypes.paragraph,116 content: '每個人都在觀望。',117 }),118 generateContentBlock({119 type: blockTypes.paragraph,120 content: `「台灣同事我們都密切聯絡,」均豪說。${createHighlight('四個台灣幹部,都在群組裡討論究竟何時回深圳。')}在公司協調下,其他人包括均豪在內,必須要在3月2日回到廠區。`,121 }),122 generateContentBlock({123 type: blockTypes.paragraph,124 content: '一開始,幾個台灣同事都暫時答應了下來,但均豪仍然向主管表示,希望多觀望一些時間再回去,幾週以來在微信和主管上演多場復工拉鋸戰,「最壞的打算就是被開除。」',125 }),126 generateContentBlock({127 type: blockTypes.paragraph,128 content: '均豪才三十歲,還算年輕,對他來說,健康比工作重要。因為不知道疫情實際狀況如何,他希望至少能觀察開工一個月後的狀況,如果沒有傳出大規模感染,要回去比較安心。',129 }),130 generateContentBlock({131 type: blockTypes.paragraph,132 content: '深圳在2月8日實施社區封閉式管理,小區之間禁止出入,嚴格盤查檢測居民體溫,熟諳品管原則的均豪說,這些都不足以讓他安心。',133 }),134 generateContentBlock({135 type: blockTypes.paragraph,136 content: `「我們這行都知道,良率不是檢查出來、而是做出來的,得病的你檢查出來有什麼用?」${createHighlight('不信任官方防疫作法,是他持續觀望的原因。')}`,137 }),138 generateContentBlock({139 type: blockTypes.narration,140 videoSrc: {141 mp4: `${cdnUrlBase}/shenzhen-infect.mp4`,142 webm: `${cdnUrlBase}/shenzhen-infect.webm`,143 poster: `${cdnUrlBase}/shenzhen-cover.jpg`,144 videoTitlle: '深圳台幹如何看官方疫情數字?',145 },146 }),147 generateContentBlock({148 type: blockTypes.headerThree,149 content: '不願返工 是害怕生病後回不了家',150 }),151 generateContentBlock({152 type: blockTypes.paragraph,153 content: '身為港商企業裡少數的台灣人,均豪最怕的是生病的時候回不了台灣。「他們可以回去香港治療,萬一我在深圳確診,連香港都不能去了,因為沒有地方會願意讓你過去。」',154 }),155 generateContentBlock({156 type: blockTypes.paragraph,157 content: '部分人對於台幹回台就醫的不諒解,也讓他有所顧忌。「得病了再回來超糟的呀,還是會怕被罵。」',158 }),159 generateContentBlock({160 type: blockTypes.paragraph,161 content: `均豪說,網路上有些講法,指台商台幹是「沒事祖國好棒棒、有事逃回台灣」,但並不是所有在中國工作的台灣人都是這樣。${createHighlight('對他而言,在那邊就是一份工作,自己並不會特別讚賞或追捧中國。')}`,162 }),163 generateContentBlock({164 type: blockTypes.paragraph,165 content: `最早曾在越南工作,均豪不是沒有想過要回台灣,但現實是薪水直接砍半,「發現怎麼這麼低。」政大經濟系畢業的他,沒有工程背景,憑著多年歷練,在海外能做到技術職位,不甘心明明有能力卻低就,均豪最終還是選擇出國。`,166 }),167 generateContentBlock({168 type: blockTypes.paragraph,169 content: `雖然有協商不成被開除的心裡準備,他還是希望盡可能保留工作,說自己以無薪假名義工作到二、三月都可以,但話一講完他就猶豫了,「恩...連續兩個月好像有點多…」內心的掙扎溢於言表。`,170 }),171 generateContentBlock({172 type: blockTypes.paragraph,173 content: `整個二月,均豪和主管的復工協商,呈現且戰且走的局面。`,174 }),175 generateContentBlock({176 type: blockTypes.paragraph,177 content: `${createHighlight('均豪坦承,主管不接受三月中才回去的時程,但也沒有要開除他的意思。')}他跟主管建議過放無薪假,但港商並沒有這樣的前例。`,178 }),179 generateContentBlock({180 type: blockTypes.paragraph,181 content: `他在台灣期間,每天都還是會遠端處理信件,但真正能做的事情不多。他在家上班仍然算出勤,但是會把自己累積的14天年假用掉。`,182 }),183 generateContentBlock({184 type: blockTypes.narration,185 videoSrc: {186 mp4: `${cdnUrlBase}/shenzhen-work.mp4`,187 webm: `${cdnUrlBase}/shenzhen-work.webm`,188 poster: `${cdnUrlBase}/shenzhen-cover.jpg`,189 videoTitlle: '深圳台幹如何跟中企老闆協商?',190 },191 }),192 generateContentBlock({193 type: blockTypes.paragraph,194 content: `經過一個月的漫長拉鋸,均豪最終選擇了工作,在三月中回到深圳。他表示,一方面是因為疫情暫時趨緩,另一方面也是捨不得現在這份工作。`,195 }),196 generateContentBlock({197 type: blockTypes.paragraph,198 content: `雖然他整個二月都在台灣待命,但公司的薪水仍然照發,疫情期間請的假,可以用之後的加班時數補,等於讓員工預支休假但不減薪,相當大方。`,199 }),200 generateContentBlock({201 type: blockTypes.paragraph,202 content: `由於蘋果公司3月14日宣布關閉大中華區以外的全球門市,均豪坦承目前公司處於無單可接、人力過剩的狀態,但是預計三、四月的薪資仍會如期發放。`,203 }),204]205const contentSectionTwo = [206 generateContentBlock({207 type: blockTypes.backgoundImage,208 backgroundImageSrc: {209 desktop: `${cdnUrlBase}/shanghai-bg-desktop.jpg`,210 mobile: `${cdnUrlBase}/shanghai-bg-mobile.jpg`,211 },212 bgCatchPhrases: {213 one: null,214 two: null,215 },216 }),217 generateContentBlock({218 type: blockTypes.headerThree,219 content: '寧被關兩週也要撤 台幹夫妻三天兩夜快閃搬家',220 }),221 generateContentBlock({222 type: blockTypes.paragraph,223 content: '當許多台幹身陷復工困境,有的人已經準備回台發展,甚至不惜被隔離14天也要回中國搶救家當。',224 }),225 generateContentBlock({226 type: blockTypes.paragraph,227 content: `${createHighlight('「因為安全問題,就不考慮回去了。」')}電話那頭38歲的啟祥(化名),2月25日終於踏出商旅房門,結束為期14天的居家檢疫。`,228 }),229 generateContentBlock({230 type: blockTypes.paragraph,231 content: '原本在上海連鎖日本料理店擔任總廚的啟祥,和太太在上海工作約兩年,1月23日回台灣過年,沒想到因為這波疫情,啟祥的老闆在1月30日結清所有員工薪水就結束營業。',232 }),233 generateContentBlock({234 type: blockTypes.paragraph,235 content: '後續聽說上海可能封城,夫妻倆趕在2月10日官方開工日之前,把大部分東西收完,三天兩夜內來回台灣。',236 }),237 generateContentBlock({238 type: blockTypes.narration,239 videoSrc: {240 mp4: `${cdnUrlBase}/shanghai.mp4`,241 webm: `${cdnUrlBase}/shanghai.webm`,242 poster: `${cdnUrlBase}/shanghai-cover.jpg`,243 videoTitlle: '上海台幹夫妻如何快閃打包行李?',244 },245 }),246 generateContentBlock({247 type: blockTypes.paragraph,248 content: '夫妻倆寧願冒險也要撤回台灣,醫療問題是背後最大的擔憂。',249 }),250 generateContentBlock({251 type: blockTypes.paragraph,252 content: `「最壞的打算是寧願在這邊看醫生。」一年多前赴陸工作的啟祥說,之前有中國同事在回診時,${createHighlight('被醫院告知之前打錯針或開錯藥,讓他對當地的醫療品質缺乏信心,')}「他們都不會覺得離譜,但我們怎麼敢去看。」`,253 }),254 generateContentBlock({255 type: blockTypes.paragraph,256 content: `目前廣告業的妻子是遠距辦公,工作進度受到影響。除了跟客戶提案或開會,沒辦法面對面進行,一天之中的工作時刻表也拉長。雖然只有六到八小時,但公司多數同事都遠距上班,溝通不如在辦公室方便,${createHighlight('有時到晚上十點、十一點都還在處理公事。')}`,257 }),258 generateContentBlock({259 type: blockTypes.paragraph,260 content: `經過討論,太太近期工作告一段落後就會離職,兩人打算在台灣重新開始。`,261 }),262 generateContentBlock({263 type: blockTypes.paragraph,264 content: `啟祥表示,兩年前到中國工作,是想見見世面、開拓眼界,夫妻兩人的薪水也都比在台灣時高,因為疫情要放棄工作回台,難免覺得可惜,${createHighlight('但疫情短期難見好轉,安全還是第一考量。')}`,265 }),266 generateContentBlock({267 type: blockTypes.paragraph,268 content: `復工進入第三週,許多台幹都陸續被「逼工」。啟祥認識的一個餐飲業高階主管,在公司要求下,已在2月24日回到上海,理由是高管做榜樣、樹立表率,底下員工才會願意跟進。`,269 }),270 generateContentBlock({271 type: blockTypes.paragraph,272 content: `雖然人回去了,公司政策是二月不給薪,三、四月的薪水延遲發,至於何時發薪仍不確定,${createHighlight('「他知道這不太合理,但又不能做什麼。」')}`,273 }),274 generateContentBlock({275 type: blockTypes.paragraph,276 content: `相對於年輕族群,在對岸發展已久的台灣人,仍然期待能盡快回去上班。`,277 }),278]279const contentSectionThree = [280 generateContentBlock({281 type: blockTypes.backgoundImage,282 backgroundImageSrc: {283 desktop: `${cdnUrlBase}/beijing-bg-desktop.jpg`,284 mobile: `${cdnUrlBase}/beijing-bg-mobile.jpg`,285 },286 bgCatchPhrases: {287 one: null,288 two: null,289 },290 }),291 generateContentBlock({292 type: blockTypes.headerThree,293 content: '北京豐臺第一位台灣中醫師 他的選擇是什麼?',294 }),295 generateContentBlock({296 type: blockTypes.paragraph,297 content: '「畢竟花了十年時間在北京打下基礎,不可能隨便就說不回去了。」南投竹山一間中藥鋪裡,五十七歲的中醫師謝茂源,頭髮灰白,笑容和藹。',298 }),299 generateContentBlock({300 type: blockTypes.paragraph,301 content: '謝茂源的父親習武多年,對跌打傷科頗有研究,五十多年前在竹山開了中藥房,因此謝茂源年輕時在父親耳濡目染下,對中醫產生興趣。',302 }),303 generateContentBlock({304 type: blockTypes.paragraph,305 content: '2005年考取中國中醫師執照的他,今年從醫屆滿十年,他的中醫執業證,在北京豐臺區是TW編號的第一號,如今因不孕症門診小有名氣,在北京市六醫院等五家醫療院所都有設診。',306 }),307 generateContentBlock({308 type: blockTypes.paragraph,309 content: `北京2月9日發布實施社區管理,消息一出,人已回台灣過年的謝茂源,不停聽到微信訊息聲咚咚作響。${createHighlight('許多中醫診所陸續暫停門診,至今不確定何時恢復')},他和太太兩個人目前先留在台灣,等待開工。`,310 }),311 generateContentBlock({312 type: blockTypes.paragraph,313 content: `由於中國不少中醫診所是零底薪,收入以掛號費為主,${createHighlight('這波停業,讓他收入驟減。')}`,314 }),315 generateContentBlock({316 type: blockTypes.paragraph,317 content: `謝茂源一次掛號費是人民幣100元(約新台幣420元),要價不斐。即使如此,一診平均仍有30到40個病人,${createHighlight('一天不看診就至少損失6000元人民幣(約新台幣2萬5千元)')}。「損失大了呀。」謝茂源嘆道。`,318 }),319 generateContentBlock({320 type: blockTypes.paragraph,321 content: `不過,中國由於數位服務發達,醫生即使人在台灣,還是能用手機線上看診。`,322 }),323 generateContentBlock({324 type: blockTypes.paragraph,325 content: `打開一個APP軟體,謝茂源在上面的病患已經排到1210號,除了初診病人不適用之外,複診病患可以填問診單,附上如舌頭、臉部的照片,讓醫生診斷。年後以來,他已經線上看了至少50多個病人。`,326 }),327 generateContentBlock({328 type: blockTypes.paragraph,329 content: `在中國十多年,謝茂源已經習慣北京的生活,「我們只要一支手機就可以搞定所有的開支,生活幾乎不用帶錢。」他的兒子目前在北京念醫學院,孫子也即將在六月誕生,北京早已是謝茂源的第二個家。`,330 }),331 generateContentBlock({332 type: blockTypes.paragraph,333 content: `子孫根留北京,謝茂源一則以喜、一則以憂。事實上,謝茂源的兒子過年期間從未踏出北京,${createHighlight('因為正巧轉到醫院急診科接受培訓,幾乎是疫情爆發之際的第一線人員,')}但他卻不急著離開,想留守急診科繼續服務。`,334 }),335 generateContentBlock({336 type: blockTypes.narration,337 videoSrc: {338 mp4: `${cdnUrlBase}/beijing.mp4`,339 webm: `${cdnUrlBase}/beijing.webm`,340 poster: `${cdnUrlBase}/beijing-cover.jpg`,341 videoTitlle: '台灣中醫師的兒子在北京現況如何?',342 },343 }),344]345const contentSectionFour = [346 generateContentBlock({347 type: blockTypes.backgoundImage,...

Full Screen

Full Screen

CreateHighlight.js

Source:CreateHighlight.js Github

copy

Full Screen

1'use strict';2import { EditAction } from './EditAction'3import { MarkupHighlight } from '../MarkupHighlight'4import { cloneStyle } from '../StyleUtils'5 /**6 *7 * @param editor8 * @param id9 * @param position10 * @param size11 * @param rotation12 * @param locations13 * @param style14 * @constructor15 */16 export function CreateHighlight(editor, id, position, size, rotation, locations, style) {17 EditAction.call(this, editor, 'CREATE-HIGHLIGHT', id);18 this.selectOnExecution = false;19 this.position = position;20 this.size = size;21 this.rotation = rotation;22 this.movements = locations.slice(0);23 this.style = cloneStyle(style);24 }25 CreateHighlight.prototype = Object.create(EditAction.prototype);26 CreateHighlight.prototype.constructor = CreateHighlight;27 var proto = CreateHighlight.prototype;28 proto.redo = function() {29 var editor = this.editor;30 var highlight = new MarkupHighlight(this.targetId, editor);31 editor.addMarkup(highlight);32 highlight.set(this.position, this.size, this.movements, false);33 highlight.setRotation(this.rotation);34 highlight.setStyle(this.style);35 };36 proto.undo = function() {37 var markup = this.editor.getMarkup(this.targetId);38 markup && this.editor.removeMarkup(markup);...

Full Screen

Full Screen

DeleteHighlight.js

Source:DeleteHighlight.js Github

copy

Full Screen

1'use strict';2import { EditAction } from './EditAction'3import { CreateHighlight } from './CreateHighlight'4 /**5 *6 * @param editor7 * @param highlight8 * @constructor9 */10 export function DeleteHighlight(editor, highlight) {11 EditAction.call(this, editor, 'DELETE-HIGHLIGHT', highlight.id);12 this.createHighlight = new CreateHighlight(13 editor,14 highlight.id,15 highlight.position,16 highlight.size,17 highlight.rotation,18 highlight.locations,19 highlight.getStyle());20 }21 DeleteHighlight.prototype = Object.create(EditAction.prototype);22 DeleteHighlight.prototype.constructor = DeleteHighlight;23 var proto = DeleteHighlight.prototype;24 proto.redo = function() {25 this.createHighlight.undo();26 };27 proto.undo = function() {28 this.createHighlight.redo();...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { createHighlight } = require("qawolf");2const element = document.querySelector("body");3createHighlight(element);4const { createHighlight } = require("qawolf");5const element = document.querySelector("body");6createHighlight(element);7const { createHighlight } = require("qawolf");8const element = document.querySelector("body");9createHighlight(element);10const { createHighlight } = require("qawolf");11const element = document.querySelector("body");12createHighlight(element);13const { createHighlight } = require("qawolf");14const element = document.querySelector("body");15createHighlight(element);16const { createHighlight } = require("qawolf");17const element = document.querySelector("body");18createHighlight(element);19const { createHighlight } = require("qawolf");20const element = document.querySelector("body");21createHighlight(element);22const { createHighlight } = require("qawolf");23const element = document.querySelector("body");24createHighlight(element);25const { createHighlight } = require("qawolf");26const element = document.querySelector("body");27createHighlight(element);28const { createHighlight } = require("qawolf");29const element = document.querySelector("body");30createHighlight(element);31const { createHighlight } = require("qawolf");32const element = document.querySelector("body");33createHighlight(element);34const { createHighlight } = require("qawolf");35const element = document.querySelector("body");36createHighlight(element);37const { createHighlight } = require("qawolf");38const element = document.querySelector("body");39createHighlight(element);

Full Screen

Using AI Code Generation

copy

Full Screen

1const qawolf = require("qawolf");2const { createHighlight } = qawolf;3const highlight = createHighlight({4});5console.log(highlight);6const qawolf = require("qawolf");7const { createHighlight } = qawolf;8const highlight = createHighlight({9});10console.log(highlight);11const qawolf = require("qawolf");12const { createHighlight } = qawolf;13const highlight = createHighlight({14});15console.log(highlight);16const qawolf = require("qawolf");17const { createHighlight } = qawolf;18const highlight = createHighlight({19});20console.log(highlight);21const qawolf = require("qawolf");22const { createHighlight } = qawolf;23const highlight = createHighlight({24});25console.log(highlight);26const qawolf = require("qawolf");27const { createHighlight } = qawolf;28const highlight = createHighlight({29});30console.log(highlight);

Full Screen

Using AI Code Generation

copy

Full Screen

1const { createHighlight } = require('qawolf');2createHighlight('selector', 'page', 'name');3const { createHighlight } = require('qawolf');4createHighlight('selector', 'page', 'name');5const { createHighlight } = require('qawolf');6createHighlight('selector', 'page', 'name');7const { createHighlight } = require('qawolf');8createHighlight('selector', 'page', 'name');9const { createHighlight } = require('qawolf');10createHighlight('selector', 'page', 'name');11const { createHighlight } = require('qawolf');12createHighlight('selector', 'page', 'name');13const { createHighlight } = require('qawolf');14createHighlight('selector', 'page', 'name');15const { createHighlight } = require('qawolf');16createHighlight('selector', 'page', 'name');17const { createHighlight } = require('qawolf');18createHighlight('selector', 'page', 'name');19const { createHighlight } = require('qawolf');20createHighlight('selector', 'page', 'name');21const { createHighlight } = require('qawolf');22createHighlight('selector', 'page', 'name');23const { createHighlight } = require('qawolf');24createHighlight('selector', 'page', 'name');25const { createHighlight } = require('qawolf');26createHighlight('selector', 'page', 'name');27const { createHighlight } = require('qawolf');28createHighlight('selector', 'page', 'name');29const { createHighlight } = require('q

Full Screen

Using AI Code Generation

copy

Full Screen

1const { createHighlight } = require("qawolf");2const highlight = createHighlight();3highlight({4 code: "await page.click('body');",5});6const { createHighlight } = require("qawolf");7const highlight = createHighlight();8highlight({9 code: "await page.click('body');",10});11const { createHighlight } = require("qawolf");12const highlight = createHighlight();13highlight({14 code: "await page.click('body');",15});16const { createHighlight } = require("qawolf");17const highlight = createHighlight();18highlight({19 code: "await page.click('body');",20});21const { createHighlight } = require("qawolf");22const highlight = createHighlight();23highlight({24 code: "await page.click('body');",25});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run qawolf automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful