From 2d4de62ac5d9db3f2d54f6f1b29d7269d3817e63 Mon Sep 17 00:00:00 2001 From: Mahesh Kale Date: Fri, 15 Jul 2022 01:35:30 +0530 Subject: [PATCH] Fixed screenshot issue in Explorer, changed width of refresh button, added accept liscense flag in handle.exe command process --- .../Ginger/UserControlsLib/UCExplorerWindowSelection.xaml | 2 +- Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs | 2 +- .../Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Ginger/Ginger/UserControlsLib/UCExplorerWindowSelection.xaml b/Ginger/Ginger/UserControlsLib/UCExplorerWindowSelection.xaml index 5f730211fb..ebd8e3d1fa 100644 --- a/Ginger/Ginger/UserControlsLib/UCExplorerWindowSelection.xaml +++ b/Ginger/Ginger/UserControlsLib/UCExplorerWindowSelection.xaml @@ -29,7 +29,7 @@ HorizontalAlignment="Left" VerticalAlignment="Center" FontWeight="Bold" Foreground="{StaticResource $SelectionColor_Pink}"/> + HorizontalAlignment="Left" VerticalAlignment="Center" ToolTip="Refresh Windows List" ButtonFontImageSize="16" Width="30" /> diff --git a/Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs b/Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs index 1ae2462b31..94bdcc0534 100644 --- a/Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs +++ b/Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs @@ -1024,7 +1024,7 @@ private Boolean IsInstrumentationModuleLoaded(int id) return false; } - var processHandle = Process.Start(new ProcessStartInfo() { FileName = handleExePath, Arguments = String.Format(" -p {0} GingerAgent.jar", id), UseShellExecute = false, RedirectStandardOutput = true }); + var processHandle = Process.Start(new ProcessStartInfo() { FileName = handleExePath, Arguments = String.Format(" -accepteula -p {0} GingerAgent.jar", id), UseShellExecute = false, RedirectStandardOutput = true }); string cliOut = processHandle.StandardOutput.ReadToEnd(); processHandle.WaitForExit(); processHandle.Close(); diff --git a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs index d6f1746207..5931a10f4b 100644 --- a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs +++ b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Selenium/SeleniumDriver.cs @@ -7731,7 +7731,7 @@ async Task IVisualTestingDriver.GetElementAtPoint(long ptX, long pt { string s_Script = "return document.elementFromPoint(arguments[0], arguments[1]);"; - RemoteWebElement ele = (RemoteWebElement)((IJavaScriptExecutor)Driver).ExecuteScript(s_Script, ptX, ptY); + IWebElement ele = (IWebElement)((IJavaScriptExecutor)Driver).ExecuteScript(s_Script, ptX, ptY); if (ele == null) { @@ -7789,7 +7789,7 @@ async Task IVisualTestingDriver.GetElementAtPoint(long ptX, long pt parentElementLocation.X += elemInfo.X; parentElementLocation.Y += elemInfo.Y; - Point p_Pos = GetElementPosition(ele); + Point p_Pos = GetElementPosition((RemoteWebElement)ele); ptX -= p_Pos.X; ptY -= p_Pos.Y; @@ -7840,7 +7840,7 @@ public Point GetElementPosition(RemoteWebElement i_Elem) + "} " + "return new Array(X, Y);"; - RemoteWebDriver i_Driver = (RemoteWebDriver)i_Elem.WrappedDriver; + RemoteWebDriver i_Driver = (RemoteWebDriver)((RemoteWebElement)i_Elem).WrappedDriver; IList i_Coord = (IList)i_Driver.ExecuteScript(s_Script); int s32_ScrollX = Convert.ToInt32(i_Coord[0]);