AnsweredAssumed Answered

Resizing the Window of any browser triggered with DevTest 9.5

Question asked by Mohankumar-5.R-5 on Jan 31, 2017
Latest reply on Feb 13, 2017 by Mohankumar-5.R-5

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)
============================================================================

Outcomes