Example: Drag & Drop

In this example, we want to demonstrate to you how you can use the drag and drop functionality. So, you use drag, start and label to select the element you want to start, and then you can use the "DragOver" function, the label to drag it over something, and the function to stop dragging

Example Code

import {Browser} from 'kogi'

const page = await Browser.start("YOUR API KEY", "local", "Example #1")

await page.navigate("https://kogiqa.com/static/examples/shapes")

await page.dragStart("square")
await page.dragEnd("2")

await page.dragStart("triangle")
await page.dragEnd("1")

await page.dragStart("star")
await page.dragEnd("4")

await page.dragStart("circle")
await page.dragEnd("3")

await page.close()