Service Virtualization

Expand all | Collapse all

Resizing the Window of any browser triggered with DevTest 9.5

Jump to Best Answer
  • 1.  Resizing the Window of any browser triggered with DevTest 9.5

    Posted 01-31-2017 04:59 AM

    Hi All,

     

    We had the below code earlier in our DevTest 8.4, which was working. After upgrading to 9.5 version, the same step is not working.

     

    import org.openqa.selenium.remote.RemoteWebDriver;
    RemoteWebDriver driver = testExec.getStateObject("selenium.testrun").getDriver();
    driver.manage().window().maximize();

     

    Now, we are getting the error as below

     

    ============================================================================
    | Error in Script
    ============================================================================
    | Step: Maximize Window
    ----------------------------------------------------------------------------
    | Message: bsh.EvalError: Sourced file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : Typed variable declaration : Error in method invocation: Method getDriver() not found in class'com.itko.lisa.glass.SeleniumTestNode$SeleniumState' : at Line: 2 : in file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : .getDriver ( )
    in inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' at line number 2
    ----------------------------------------------------------------------------
    | Trapped Exception: bsh.EvalError: Sourced file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : Typed variable declaration : Error in method invocation: Method getDriver() not found in class'com.itko.lisa.glass.SeleniumTestNode$SeleniumState' : at Line: 2 : in file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : .getDriver ( )
    in inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' at line number 2
    | Trapped Message: javax.script.ScriptException: bsh.EvalError: Sourced file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : Typed variable declaration : Error in method invocation: Method getDriver() not found in class'com.itko.lisa.glass.SeleniumTestNode$SeleniumState' : at Line: 2 : in file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : .getDriver ( )
    in inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' at line number 2
    ----------------------------------------------------------------------------
    STACK TRACE
    javax.script.ScriptException: bsh.EvalError: Sourced file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : Typed variable declaration : Error in method invocation: Method getDriver() not found in class'com.itko.lisa.glass.SeleniumTestNode$SeleniumState' : at Line: 2 : in file: inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' : .getDriver ( )
    in inline evaluation of: ``import org.openqa.selenium.remote.RemoteWebDriver; RemoteWebDriver driver = tes . . . '' at line number 2
    at bsh.BshScriptEngine.evalSource(BshScriptEngine.java:102)
    at bsh.BshScriptEngine.eval(BshScriptEngine.java:61)
    at javax.script.AbstractScriptEngine.eval(Unknown Source)
    at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:674)
    at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:427)
    at com.itko.lisa.test.UserScriptNode._execute(UserScriptNode.java:210)
    at com.itko.lisa.test.UserScriptNode.execute(UserScriptNode.java:175)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
    ============================================================================



  • 2.  Re: Resizing the Window of any browser triggered with DevTest 9.5

    Broadcom Employee
    Posted 02-01-2017 02:23 PM

    Mohankumar,  when you did the upgrade,  did you do it on a different folder  or  on the same  8.4 folder ?  Wondering if some of the jars are not upgraded.  

     

    Thanks

     

    Shiney. 



  • 3.  Re: Resizing the Window of any browser triggered with DevTest 9.5

    Posted 02-03-2017 03:26 AM

    Hi Shiney Abraham,

     

    We did a fresh installation of DevTest 9.5 and then imported the projects.

     

    Thanks & Regards,

    Mohan



  • 4.  Re: Resizing the Window of any browser triggered with DevTest 9.5
    Best Answer

    Broadcom Employee
    Posted 02-03-2017 09:21 AM

    Mohan, could you please open a ticket with CA Support.  I can take a look at the issue in a webex. 

     

    Thanks

     

    Shiney. 



  • 5.  Re: Resizing the Window of any browser triggered with DevTest 9.5

    Posted 02-03-2017 09:28 AM

    Hi Shiney,

     

    A ticket was opened for this issue on 31st Jan 2017. Presently it is with Sustaining Engineering Team.

    Ticket Id : 00661850 . But we need a quick solution.

     

    Thanks in advance.

     

    Regards,

    Mohan



  • 6.  Re: Resizing the Window of any browser triggered with DevTest 9.5

    Posted 02-13-2017 04:54 AM

    We got the below answer from the sustaining engineering team on this issue. 

    -------------------------------------------------

    Hi Mohan,

     

    Thank you for your time on call today. As discussed, the functionality that you are using is, unfortunately, not a part of our published SDK – we are unable to provide assistance for functionality that does not exist within our published interfaces.

     

    We appreciate that this worked in a previous release, even though it is neither in our SDK nor supported in that release. It is unfortunate that you were provided this information via the DevTest Communities site as it has resulted in the development of tests that will not function when this internal code has changed.

     

    We regret that we will not be able to address your issue as a defect since the call that you are using is not designed for direct use – we would suggest that, should this functionality be required, an enhancement request be made to add this to a future release. We will be more than happy to provide a document outlining the process for this.

     

     

    ------------------------------------------

     

    Please let us know if any workarounds could help us.