I want to automate Drag and in my angular app.
So I tried this code like in the protractor documentation
browser.actions().
dragAndDrop(element1, element2).
perform();
But it is not working for me.
I need drag this S to the Read color area
xpath for S -
var element1 = element(by.xpath('/html/body/app-root/app-dashboard-layout/div/app-create-new-workflow/div/div/div/div/div/div/div[2]/div/mat-tab-group/div/mat-tab-body[1]/div/div/div[1]/div[1]/app-element-pallete/div/div/div[1]/div[1]/button'))
xpath for Red color - var element2 = element(by.xpath('//*[@id="form"]'))
Can anyone help me to resolve that issue?