Service Virtualization

  • 1.  Facing error in Selenium step

    Posted Jul 13, 2017 01:29 AM

    Hi Team,

     

    I am using selenium step in devetest with below JSON,

    [{"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"}}]

     

    but it is not able to find element value and throwing below exception, Need Help for the same

     

     

     

     

     

     

     

    ============================================================================
    | Error executing Selenium Step :
    [{"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"}}]
    ============================================================================
    | Step: Goto Lastpage~1
    ----------------------------------------------------------------------------
    | Message: {"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"}} failed.
    ----------------------------------------------------------------------------
    | Trapped Exception: {"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"}} failed.
    | Trapped Message: java.lang.RuntimeException: {"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"}} failed.
    ----------------------------------------------------------------------------
    STACK TRACE
    java.lang.RuntimeException: {"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"}} failed.
    at com.sebuilder.interpreter.TestRun.executeStep(TestRun.java:81)
    at com.itko.lisa.glass.SeleniumScriptExecutor.executeStep(SeleniumScriptExecutor.java:374)
    at com.itko.lisa.glass.SeleniumScriptExecutor.executeStep(SeleniumScriptExecutor.java:306)
    at com.itko.lisa.glass.SeleniumStep.execute(SeleniumStep.java:311)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1283)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1050)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:70)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:963)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: Missing parameter "value" at step #4.
    at com.sebuilder.interpreter.TestRun.string(TestRun.java:133)
    at com.sebuilder.interpreter.Verify.run(Verify.java:35)
    at com.sebuilder.interpreter.TestRun.executeStep(TestRun.java:75)
    ... 12 more
    ============================================================================



  • 2.  Re: Facing error in Selenium step

    Broadcom Employee
    Posted Jul 13, 2017 05:45 PM

    Does this test playback  fine in  selenium builder?  



  • 3.  Re: Facing error in Selenium step

    Posted Jul 13, 2017 08:15 PM

    Hi Shiney,

     

    Selenium builder recorder never creates a step "verifyElementValue" , so i have tried creating it in LISA by selecting the step from drop down from one of the step.

     

    thanks.



  • 4.  Re: Facing error in Selenium step
    Best Answer

    Broadcom Employee
    Posted Jul 14, 2017 02:05 PM

    Yadu,  can you please open a ticket with CA Support ?  We would have to look at your Json script  and the Filter you have added..  

     

    --Shiney 



  • 5.  Re: Facing error in Selenium step

    Posted Nov 08, 2017 07:39 PM

    Working now, attribute value was missing from the  JSON, 

    Corrected is Below, 

    [{"negated":false,"text":"Hello","type":"verifyElementValue","locator":{"type":"xpath","value":"//table[@id='gridview-1153-table']/tbody[@id='gridview-1153-body']/tr[last()]/td[2]/div"},"Value": "Hello"}]