Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix - 41087, 41092 - Playwright Explorer Bug Fixes #3879

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/GingerWebDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
*/
#endregion

using Amdocs.Ginger.Common;
using Amdocs.Ginger.Common.Drivers.CoreDrivers.Web;
using Amdocs.Ginger.Common.UIElement;
using Amdocs.Ginger.CoreNET.Drivers.CoreDrivers.Web.POM;
Expand Down Expand Up @@ -194,9 +195,16 @@ private protected async Task HighlightElementAsync(IBrowserElement element)

private protected async Task UnhighlightElementAsync(IBrowserElement element)
{
await element.ExecuteJavascriptAsync("element => element.style.outline=''");
await element.ExecuteJavascriptAsync("element => element.style.backgroundColor=''");
await element.ExecuteJavascriptAsync("element => element.style.border=''");
try
{
await element.ExecuteJavascriptAsync("element => element.style.outline=''");
await element.ExecuteJavascriptAsync("element => element.style.backgroundColor=''");
await element.ExecuteJavascriptAsync("element => element.style.border=''");
}
catch (Exception ex)
{
Reporter.ToLog(eLogLevel.DEBUG, "error while unhighlighting element", ex);
}
}

private protected Task SwitchToFrame(eLocateBy locateBy, string locateValue)
Expand Down
Loading