Forum Discussion

nedbacan's avatar
nedbacan
Frequent Contributor
3 years ago
Solved

Trying to call the FindChild method or property of an object but it does not exist

Hello, can someone help debug the following script, I cannot figure it out why it's failing being I am new to TC.

 

I included the screenshot of the properties from the Spy captured,I am sure the page ID is correct according to the spy screen.

 

function DragCard()
{
// Find the first column element
   var column1 = Sys.Browser("chrome").Page("https://rdx-dev.rdxhub.com/workspace/patient-board").FindChild("idStr", "chk-drop-list-0", 10);

// Find the card element in the first column with the desired text content
   var cardToMove = column1.FindChild("contentText", "Test Patient455", 10);

// Find the second column element

   var column2 = Sys.Browser("chrome").Page("https://rdx-dev.rdxhub.com/workspace/patient-board").FindChild("idStr", "chk-drop-list-2", 10);

// Drag the card to the second column
   cardToMove.Drag(column2);
}