Best Rod code snippet using rod.WaitStableRAF
element.go
Source:element.go
...51// ScrollIntoView å°å½åå
ç´ æ»å¨å°æµè§å¨çªå£çå¯è§åºåä¸ï¼å¦æå®å°æªå¨å¯è§åºåå
ï¼ã52func (el *Element) ScrollIntoView() error {53 defer el.tryTrace(TraceTypeInput, "scroll into view")()54 el.page.browser.trySlowmotion()55 err := el.WaitStableRAF()56 if err != nil {57 return err58 }59 return proto.DOMScrollIntoViewIfNeeded{ObjectID: el.id()}.Call(el)60}61// Hover å°é¼ æ åå¨å
ç´ çä¸å¿62// å¨æ§è¡è¯¥æä½ä¹åï¼å®å°å°è¯æ»å¨å°è¯¥å
ç´ å¹¶çå¾
å
¶å¯äº¤äºã63func (el *Element) Hover() error {64 pt, err := el.WaitInteractable()65 if err != nil {66 return err67 }68 return el.page.Mouse.Move(pt.X, pt.Y, 1)69}70// MoveMouseOut å°é¼ æ 移åºå½åå
ç´ 71func (el *Element) MoveMouseOut() error {72 shape, err := el.Shape()73 if err != nil {74 return err75 }76 box := shape.Box()77 return el.page.Mouse.Move(box.X+box.Width, box.Y, 1)78}79// Click ä¼å人ä¸æ ·æä¸ç¶åéæ¾æé®ã80// å¨æ§è¡æä½ä¹åï¼å®å°å°è¯æ»å¨å°å
ç´ ï¼å°é¼ æ æ¬åå¨è¯¥å
ç´ ä¸ï¼çå¾
该å
ç´ å¯äº¤äºå¹¶å¯ç¨ã81func (el *Element) Click(button proto.InputMouseButton) error {82 err := el.Hover()83 if err != nil {84 return err85 }86 err = el.WaitEnabled()87 if err != nil {88 return err89 }90 defer el.tryTrace(TraceTypeInput, string(button)+" click")()91 return el.page.Mouse.Click(button)92}93// Tap å°æ»å¨å°æé®å¹¶å人类ä¸æ ·ç¹å»å®ã94// å¨æ§è¡æ¤æä½ä¹åï¼å®å°å°è¯æ»å¨å°å
ç´ ï¼å¹¶çå¾
å
¶å¯äº¤äºå¹¶å¯ç¨ã95func (el *Element) Tap() error {96 err := el.ScrollIntoView()97 if err != nil {98 return err99 }100 err = el.WaitEnabled()101 if err != nil {102 return err103 }104 pt, err := el.WaitInteractable()105 if err != nil {106 return err107 }108 defer el.tryTrace(TraceTypeInput, "tap")()109 return el.page.Touch.Tap(pt.X, pt.Y)110}111// Interactable æ£æ¥è¯¥å
ç´ æ¯å¦å¯ä»¥ä¸å
æ 交äºã112// å
æ å¯ä»¥æ¯é¼ æ ãææãæåç¬çã113// å¦æä¸æ¯å¯äº¤äºçï¼Errå°æ¯ErrNotInteractableï¼ä¾å¦å½è¢«ä¸ä¸ªæ¨¡ææ¡è¦çæ¶ã114func (el *Element) Interactable() (pt *proto.Point, err error) {115 noPointerEvents, err := el.Eval(`() => getComputedStyle(this).pointerEvents === 'none'`)116 if err != nil {117 return nil, err118 }119 if noPointerEvents.Value.Bool() {120 return nil, &ErrNoPointerEvents{el}121 }122 shape, err := el.Shape()123 if err != nil {124 return nil, err125 }126 pt = shape.OnePointInside()127 if pt == nil {128 err = &ErrInvisibleShape{el}129 return130 }131 scroll, err := el.page.root.Eval(`() => ({ x: window.scrollX, y: window.scrollY })`)132 if err != nil {133 return134 }135 elAtPoint, err := el.page.ElementFromPoint(136 int(pt.X)+scroll.Value.Get("x").Int(),137 int(pt.Y)+scroll.Value.Get("y").Int(),138 )139 if err != nil {140 if errors.Is(err, cdp.ErrNodeNotFoundAtPos) {141 err = &ErrInvisibleShape{el}142 }143 return144 }145 isParent, err := el.ContainsElement(elAtPoint)146 if err != nil {147 return148 }149 if !isParent {150 err = &ErrCovered{elAtPoint}151 }152 return153}154// Shape DOMå
ç´ å
容çå½¢ç¶ã该形ç¶æ¯ä¸ç»4è¾¹å¤è¾¹å½¢ï¼4è§ï¼ã155// 4-gonä¸ä¸å®æ¯ä¸ä¸ªé¿æ¹å½¢ã4-gonå¯ä»¥å½¼æ¤åå¼ã156// ä¾å¦ï¼æ们使ç¨2个4è§æ¥æ述以ä¸å½¢ç¶ï¼157//158// ____________ ____________159// / ___/ = /___________/ + _________160// /________/ /________/161//162func (el *Element) Shape() (*proto.DOMGetContentQuadsResult, error) {163 return proto.DOMGetContentQuads{ObjectID: el.id()}.Call(el)164}165// Type ä¸Keyboard.Type类似ã166// å¨æ§è¡æä½ä¹åï¼å®å°å°è¯æ»å¨å°è¯¥å
ç´ å¹¶å°ç¦ç¹éä¸å¨è¯¥å
ç´ ä¸ã167func (el *Element) Type(keys ...input.Key) error {168 err := el.Focus()169 if err != nil {170 return err171 }172 return el.page.Keyboard.Type(keys...)173}174// KeyActions ä¸Page.KeyActions类似ã175// å¨æ§è¡æä½ä¹åï¼å®å°å°è¯æ»å¨å°è¯¥å
ç´ å¹¶å°ç¦ç¹éä¸å¨è¯¥å
ç´ ä¸ã176func (el *Element) KeyActions() (*KeyActions, error) {177 err := el.Focus()178 if err != nil {179 return nil, err180 }181 return el.page.KeyActions(), nil182}183// SelectText éæ©ä¸æ£å表达å¼å¹é
çææ¬ã184// å¨æ§è¡æä½ä¹åï¼å®å°å°è¯æ»å¨å°è¯¥å
ç´ å¹¶å°ç¦ç¹éä¸å¨è¯¥å
ç´ ä¸ã185func (el *Element) SelectText(regex string) error {186 err := el.Focus()187 if err != nil {188 return err189 }190 defer el.tryTrace(TraceTypeInput, "select text: "+regex)()191 el.page.browser.trySlowmotion()192 _, err = el.Evaluate(evalHelper(js.SelectText, regex).ByUser())193 return err194}195// SelectAllText éæ©ææææ¬196// å¨æ§è¡æä½ä¹åï¼å®å°å°è¯æ»å¨å°è¯¥å
ç´ å¹¶å°ç¦ç¹éä¸å¨è¯¥å
ç´ ä¸ã197func (el *Element) SelectAllText() error {198 err := el.Focus()199 if err != nil {200 return err201 }202 defer el.tryTrace(TraceTypeInput, "select all text")()203 el.page.browser.trySlowmotion()204 _, err = el.Evaluate(evalHelper(js.SelectAllText).ByUser())205 return err206}207// Input èç¦å¨è¯¥å
ç´ ä¸å¹¶è¾å
¥ææ¬.208// å¨æ§è¡æä½ä¹åï¼å®å°æ»å¨å°å
ç´ ï¼çå¾
å
¶å¯è§ãå¯ç¨åå¯åã209// è¦æ¸
空è¾å
¥ï¼å¯ä»¥ä½¿ç¨el.SelectAllTextï¼ï¼.MustInputï¼ââï¼ä¹ç±»çå½ä»¤210func (el *Element) Input(text string) error {211 err := el.Focus()212 if err != nil {213 return err214 }215 err = el.WaitEnabled()216 if err != nil {217 return err218 }219 err = el.WaitWritable()220 if err != nil {221 return err222 }223 err = el.page.InsertText(text)224 _, _ = el.Evaluate(evalHelper(js.InputEvent).ByUser())225 return err226}227// InputTime èç¦è¯¥å
ç´ åå
¶è¾å
¥æ¶é´ã228// å¨æ§è¡æä½ä¹åï¼å®å°æ»å¨å°å
ç´ ï¼çå¾
å
¶å¯è§ãå¯ç¨åå¯åã229// å®å°çå¾
å
ç´ å¯è§ãå¯ç¨åå¯åã230func (el *Element) InputTime(t time.Time) error {231 err := el.Focus()232 if err != nil {233 return err234 }235 err = el.WaitEnabled()236 if err != nil {237 return err238 }239 err = el.WaitWritable()240 if err != nil {241 return err242 }243 defer el.tryTrace(TraceTypeInput, "input "+t.String())()244 _, err = el.Evaluate(evalHelper(js.InputTime, t.UnixNano()/1e6).ByUser())245 return err246}247// Blur 类似äºæ¹æ³ Blur248func (el *Element) Blur() error {249 _, err := el.Evaluate(Eval("() => this.blur()").ByUser())250 return err251}252// Select éæ©ä¸éæ©å¨å¹é
çåé项å
ç´ ã253// å¨æä½ä¹åï¼å®å°æ»å¨å°å
ç´ ï¼çå¾
å®å¯è§ã254// å¦æ没æä¸éæ©å¨å¹é
çé项ï¼å®å°è¿åErrElementNotFoundã255func (el *Element) Select(selectors []string, selected bool, t SelectorType) error {256 err := el.Focus()257 if err != nil {258 return err259 }260 defer el.tryTrace(TraceTypeInput, fmt.Sprintf(`select "%s"`, strings.Join(selectors, "; ")))()261 el.page.browser.trySlowmotion()262 res, err := el.Evaluate(evalHelper(js.Select, selectors, selected, t).ByUser())263 if err != nil {264 return err265 }266 if !res.Value.Bool() {267 return &ErrElementNotFound{}268 }269 return nil270}271// Matches æ£æ¥csséæ©å¨æ¯å¦å¯ä»¥éæ©å
ç´ 272func (el *Element) Matches(selector string) (bool, error) {273 res, err := el.Eval(`s => this.matches(s)`, selector)274 if err != nil {275 return false, err276 }277 return res.Value.Bool(), nil278}279// Attribute DOM对象çå±æ§280// Attribute vs Property: https://stackoverflow.com/questions/6003819/what-is-the-difference-between-properties-and-attributes-in-html281func (el *Element) Attribute(name string) (*string, error) {282 attr, err := el.Eval("(n) => this.getAttribute(n)", name)283 if err != nil {284 return nil, err285 }286 if attr.Value.Nil() {287 return nil, nil288 }289 s := attr.Value.Str()290 return &s, nil291}292// Property DOM对象çå±æ§293// Property vs Attribute: https://stackoverflow.com/questions/6003819/what-is-the-difference-between-properties-and-attributes-in-html294func (el *Element) Property(name string) (gson.JSON, error) {295 prop, err := el.Eval("(n) => this[n]", name)296 if err != nil {297 return gson.New(nil), err298 }299 return prop.Value, nil300}301// SetFiles 设置å½åæ件è¾å
¥å
ç´ çæ件302func (el *Element) SetFiles(paths []string) error {303 absPaths := []string{}304 for _, p := range paths {305 absPath, err := filepath.Abs(p)306 utils.E(err)307 absPaths = append(absPaths, absPath)308 }309 defer el.tryTrace(TraceTypeInput, fmt.Sprintf("set files: %v", absPaths))()310 el.page.browser.trySlowmotion()311 err := proto.DOMSetFileInputFiles{312 Files: absPaths,313 ObjectID: el.id(),314 }.Call(el)315 return err316}317// Describe æè¿°å½åå
ç´ ã深度æ¯åºæ£ç´¢å级çæ大深度ï¼é»è®¤ä¸º1ï¼å¯¹æ´ä¸ªåæ 使ç¨-1ï¼ææä¾å¤§äº0çæ´æ°ã318// pierceå³å®å¨è¿ååæ æ¶æ¯å¦è¦éåiframesåå½±åæ ¹ã319// è¿åçproto.DOMNodeãNodeIDå°å§ç»ä¸ºç©ºï¼å 为NodeIDä¸ç¨³å®ï¼å½proto.DOMDocumentUpdated被触åæ¶ï¼320// 页é¢ä¸çææNodeIDé½å°è¢«éæ°åé
å°å¦ä¸ä¸ªå¼ï¼ãæ们ä¸å»ºè®®ä½¿ç¨NodeIDï¼èæ¯ä½¿ç¨BackendNodeIDæ¥æ è¯å
ç´ ã321func (el *Element) Describe(depth int, pierce bool) (*proto.DOMNode, error) {322 val, err := proto.DOMDescribeNode{ObjectID: el.id(), Depth: gson.Int(depth), Pierce: pierce}.Call(el)323 if err != nil {324 return nil, err325 }326 return val.Node, nil327}328// ShadowRoot ShadowRootè¿åæ¤å
ç´ çå½±åæ ¹329func (el *Element) ShadowRoot() (*Element, error) {330 node, err := el.Describe(1, false)331 if err != nil {332 return nil, err333 }334 // è½ç¶ç°å¨å®æ¯ä¸ä¸ªæ°ç»ï¼ä½w3cå°å
¶è§èæ´æ¹ä¸ºå个æ°ç»ã335 id := node.ShadowRoots[0].BackendNodeID336 shadowNode, err := proto.DOMResolveNode{BackendNodeID: id}.Call(el)337 if err != nil {338 return nil, err339 }340 return el.page.ElementFromObject(shadowNode.Object)341}342// Frame å建ä¸ä¸ªè¡¨ç¤ºiframeç页é¢å®ä¾343func (el *Element) Frame() (*Page, error) {344 node, err := el.Describe(1, false)345 if err != nil {346 return nil, err347 }348 clone := *el.page349 clone.FrameID = node.FrameID350 clone.jsCtxID = new(proto.RuntimeRemoteObjectID)351 clone.element = el352 clone.sleeper = el.sleeper353 return &clone, nil354}355// ContainesElement æ£æ¥ç®æ æ¯å¦æ¯æå¨å
ç´ å
ã356func (el *Element) ContainsElement(target *Element) (bool, error) {357 res, err := el.Evaluate(evalHelper(js.ContainsElement, target.Object))358 if err != nil {359 return false, err360 }361 return res.Value.Bool(), nil362}363// Text å
ç´ æ¾ç¤ºçææ¬364func (el *Element) Text() (string, error) {365 str, err := el.Evaluate(evalHelper(js.Text))366 if err != nil {367 return "", err368 }369 return str.Value.String(), nil370}371// HTML å
ç´ çHTML372func (el *Element) HTML() (string, error) {373 res, err := proto.DOMGetOuterHTML{ObjectID: el.Object.ObjectID}.Call(el)374 if err != nil {375 return "", err376 }377 return res.OuterHTML, nil378}379// Visible å¦æå
ç´ å¨é¡µé¢ä¸å¯è§ï¼åè¿åtrue380func (el *Element) Visible() (bool, error) {381 res, err := el.Evaluate(evalHelper(js.Visible))382 if err != nil {383 return false, err384 }385 return res.Value.Bool(), nil386}387// WaitLoad 类似äºï¼imgï¼å
ç´ ççå¾
å è½½388func (el *Element) WaitLoad() error {389 defer el.tryTrace(TraceTypeWait, "load")()390 _, err := el.Evaluate(evalHelper(js.WaitLoad).ByPromise())391 return err392}393// WaitStable çå¾
ç´å°å¨dæç»æ¶é´å
没æå½¢ç¶æä½ç½®ååã394// å°å¿ï¼dä¸æ¯æ大çå¾
è¶
æ¶ï¼å®æ¯æä¸ç¨³å®çæ¶é´ã395// å¦æè¦è®¾ç½®è¶
æ¶ï¼å¯ä»¥ä½¿ç¨âElement.timeoutâå½æ°ã396func (el *Element) WaitStable(d time.Duration) error {397 err := el.WaitVisible()398 if err != nil {399 return err400 }401 defer el.tryTrace(TraceTypeWait, "stable")()402 shape, err := el.Shape()403 if err != nil {404 return err405 }406 t := time.NewTicker(d)407 defer t.Stop()408 for {409 select {410 case <-t.C:411 case <-el.ctx.Done():412 return el.ctx.Err()413 }414 current, err := el.Shape()415 if err != nil {416 return err417 }418 if reflect.DeepEqual(shape, current) {419 break420 }421 shape = current422 }423 return nil424}425// WaitStableRAF çå¾
ç´å°è¿ç»ä¸¤ä¸ªå¨ç»å¸§çå½¢ç¶æä½ç½®æ²¡æååã426// å¦æè¦çå¾
ç±JSèä¸æ¯CSS触åçå¨ç»ï¼æ好使ç¨Element.WaitStableã427// å
³äº animation frame: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame428func (el *Element) WaitStableRAF() error {429 err := el.WaitVisible()430 if err != nil {431 return err432 }433 defer el.tryTrace(TraceTypeWait, "stable RAF")()434 var shape *proto.DOMGetContentQuadsResult435 for {436 err = el.page.WaitRepaint()437 if err != nil {438 return err439 }440 current, err := el.Shape()441 if err != nil {442 return err...
element_test.go
Source:element_test.go
...480 p := t.page.MustNavigate(t.srcFile("fixtures/wait-stable.html"))481 el := p.MustElement("button")482 el.MustEval(`this.classList.add("play")`)483 start := time.Now()484 t.E(el.WaitStableRAF())485 t.Gt(time.Since(start), time.Second)486 t.mc.stubErr(2, proto.RuntimeCallFunctionOn{})487 t.Err(el.WaitStableRAF())488 t.mc.stubErr(1, proto.DOMGetContentQuads{})489 t.Err(el.WaitStableRAF())490}491func (t T) CanvasToImage() {492 p := t.page.MustNavigate(t.srcFile("fixtures/canvas.html"))493 src, err := png.Decode(bytes.NewBuffer(p.MustElement("#canvas").MustCanvasToImage()))494 t.E(err)495 t.Eq(src.At(50, 50), color.NRGBA{0xFF, 0x00, 0x00, 0xFF})496}497func (t T) ElementWaitLoad() {498 p := t.page.MustNavigate(t.srcFile("fixtures/resource.html"))499 p.MustElement("img").MustWaitLoad()500}501func (t T) Resource() {502 p := t.page.MustNavigate(t.srcFile("fixtures/resource.html"))503 el := p.MustElement("img")...
WaitStableRAF
Using AI Code Generation
1import (2func main() {3 browser := rod.New().MustConnect().MustLaunch()4 defer browser.MustClose()5 page.MustWaitStable()6 time.Sleep(time.Second)7 page.MustScreenshot("screenshot.png")8}9import (10func main() {11 browser := rod.New().MustConnect().MustLaunch()12 defer browser.MustClose()13 page.MustWaitStable()14 time.Sleep(time.Second)15 page.MustScreenshot("screenshot.png")16}17import (18func main() {19 browser := rod.New().MustConnect().MustLaunch()20 defer browser.MustClose()21 page.MustWaitStable()22 time.Sleep(time.Second)23 page.MustScreenshot("screenshot.png")24}25import (
WaitStableRAF
Using AI Code Generation
1import (2func main() {3 r := NewRod()4 go func() {5 for {6 time.Sleep(1 * time.Second)7 r.Set(count)8 fmt.Println("Set", count)9 }10 }()11 for {12 time.Sleep(1 * time.Second)13 v := r.Get()14 fmt.Println("Get", v)15 }16}17import (18func main() {19 r := NewRod()20 go func() {21 for {22 time.Sleep(1 * time.Second)23 r.Set(count)24 fmt.Println("Set", count)25 }26 }()27 for {28 time.Sleep(1 * time.Second)29 v := r.Get()30 fmt.Println("Get", v)31 }32}33import (34func main() {35 r := NewRod()36 go func() {37 for {38 time.Sleep(1 * time.Second)39 r.Set(count)40 fmt.Println("Set", count)41 }42 }()43 for {44 time.Sleep(1 * time.Second)45 v := r.Get()46 fmt.Println("Get", v)47 }48}49import (50func main() {51 r := NewRod()52 go func() {53 for {54 time.Sleep(1 * time.Second)55 r.Set(count)56 fmt.Println("Set", count)57 }58 }()59 for {60 time.Sleep(1 * time.Second)61 v := r.Get()62 fmt.Println("Get", v)63 }64}65import (66func main() {67 r := NewRod()68 go func() {
WaitStableRAF
Using AI Code Generation
1import (2func main() {3 raft := raft.NewRaft([]string{"localhost:7000", "localhost:7001", "localhost:7002"}, "localhost:7000", "data", 10*time.Millisecond)4 raft.WaitStable(10 * time.Second)5 fmt.Println("Raft is stable")6}7import (8func main() {9 raft := raft.NewRaft([]string{"localhost:7000", "localhost:7001", "localhost:7002"}, "localhost:7000", "data", 10*time.Millisecond)10 raft.WaitStable(10 * time.Second)11 raft.AddNode("localhost:7003")12 fmt.Println("Raft is stable")13}14import (15func main() {16 raft := raft.NewRaft([]string{"localhost:7000", "localhost:7001", "localhost:7002"}, "localhost:7000", "data", 10*time.Millisecond)17 raft.WaitStable(10 * time.Second)18 raft.RemoveNode("localhost:7001")19 fmt.Println("Raft is stable")20}21import (22func main() {23 raft := raft.NewRaft([]string{"localhost:7000", "localhost:7001", "localhost:7002"}, "localhost:7000", "data", 10*time.Millisecond)24 raft.WaitStable(10 * time.Second)25 leader := raft.GetLeader()26 fmt.Println("Leader is",
WaitStableRAF
Using AI Code Generation
1func main() {2 browser := rod.New().MustConnect()3 page.MustWaitLoad()4 page.MustElement("input[name='q']").MustWaitVisible()5 page.MustElement("input[name='q']").MustInput("rod")6 page.MustElement("input[name='btnK']").MustClick()7 page.MustWaitLoad()8 page.MustWaitStable()9 browser.MustClose()10}11func main() {12 browser := rod.New().MustConnect()13 page.MustWaitLoad()14 page.MustElement("input[name='q']").MustWaitVisible()15 page.MustElement("input[name='q']").MustInput("rod")16 page.MustElement("input[name='btnK']").MustClick()17 page.MustWaitLoad()18 page.MustWaitStable()19 page.MustWaitRequestIdle()20 browser.MustClose()21}22func main() {23 browser := rod.New().MustConnect()
WaitStableRAF
Using AI Code Generation
1import (2func main() {3 rf.start()4 r.start()5 s.start()6 s.waitStable()7 fmt.Println("Leader ID: ", rf.getLeaderID())8 fmt.Println("Term: ", rf.getTerm())9 fmt.Println("Commit Index: ", rf.getCommitIndex())10 fmt.Println("Last Applied Index: ", rf.getLastAppliedIndex())11 fmt.Println("Number of log entries: ", rf.getLogSize())12 fmt.Println("Log entries: ", rf.getLogEntries())13 fmt.Println("Server state: ", s.getState())14 fmt.Println("Server term: ", s.getCurrentTerm())15 fmt.Println("Server voted for: ", s.getVotedFor())16 fmt.Println("Server log entries: ", s.getLogEntries())17 fmt.Println("Server commit index: ", s.getCommitIndex())18 fmt.Println("Server last applied index: ", s.getLastAppliedIndex())19 fmt.Println("Server next index: ", s.getNextIndex())20 fmt.Println("Server match index: ", s.getMatchIndex())21 fmt.Println("Server leader ID: ", s.getLeaderID())22 fmt.Println("Server number of votes: ", s.getNumVotes())23 fmt.Println("Server number of votes received: ", s.getNumVotesReceived())24 fmt.Println("Server number of votes granted: ", s.getNumVotesGranted())25 fmt.Println("Server number of votes rejected
WaitStableRAF
Using AI Code Generation
1import (2func main() {3 rod := NewRod(10, 10)4 signal := make(chan int)5 go func() {6 rod.WaitStableRAF(signal)7 }()8 go func() {9 rod.ChangePosition(20, 20)10 }()11 fmt.Println(rod.GetPosition())12}13import (14func main() {15 rod := NewRod(10, 10)16 signal := make(chan int)17 go func() {18 rod.WaitStableRAF(signal)19 }()20 go func() {21 rod.ChangePosition(20, 20)22 }()23 fmt.Println(rod.GetPosition())24}25import (26func main() {27 rod := NewRod(10, 10)28 signal := make(chan int)29 go func() {30 rod.WaitStableRAF(signal)31 }()32 go func() {33 rod.ChangePosition(20, 20)34 }()35 fmt.Println(rod.GetPosition())36}
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!