I have a similar problem when I try to find a button on a page, which was reported here:
https://www.ranorex.com/forum/data-bind ... t7569.html
Code: Select all
------------------------------- This exception is repeated about 470 times in the 30 seconds.
76:33.683 Debug Plugins Getting attribute 'name' failed on FlavorElement with flavor 'chromeweb'. The given key was not present in the dictionary.
Show/Hide Stacktrace
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) +0x27 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type) +0x1b3 Ranorex.Plugin.IDom.GetElementStyle(Int32 wndId,Int32 tabId,Int64 frameId,NpPtr elemId,String name) +0xffffffff Ranorex.Plugin.ChromeWebFlavorElement.GetStyleAttribute(String name) +0x0 Ranorex.Plugin.ChromeWebFlavorElement.GetAttributeValue(Element element,String name) +0x77 Ranorex.Core.Element.GetAttributeValue(String name) +0x126
------------------------------- This exception is repeated 39 times in the 30 seconds.
76:34.059 Debug Plugins Getting attribute 'name' failed on FlavorElement with flavor 'chromeweb'. Error in MsgHostDom call: Error TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at chrome-extension://egdlgaljianpgdlmfijpphbadibfncdm/content.js:1:5794 at window.RXmsg.onRecv (chrome-extension://egdlgaljianpgdlmfijpphbadibfncdm/msgport.js:1:117)
Show/Hide Stacktrace
Ranorex.RanorexException: Error in MsgHostDom call: Error TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at chrome-extension://egdlgaljianpgdlmfijpphbadibfncdm/content.js:1:5794 at window.RXmsg.onRecv (chrome-extension://egdlgaljianpgdlmfijpphbadibfncdm/msgport.js:1:117) System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) +0x27 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type) +0x1b3 Ranorex.Plugin.IDom.GetElementStyle(Int32 wndId,Int32 tabId,Int64 frameId,NpPtr elemId,String name) +0xffffffff Ranorex.Plugin.ChromeWebFlavorElement.GetStyleAttribute(String name) +0x0 Ranorex.Plugin.ChromeWebFlavorElement.GetAttributeValue(Element element,String name) +0x77 Ranorex.Core.Element.GetAttributeValue(String name) +0x126
------------------------------- This exception is repeated 3 times in the 30 seconds.
LineageGlueRule 'chrome_web_child_elements' caused RanorexException on Execute. Error in MsgHostDom call: Tab id does not exist
Show/Hide Stacktrace
Ranorex.RanorexException: Error in MsgHostDom call: Tab id does not exist System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) +0x27 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type) +0x1b3 Ranorex.Plugin.IDom.GetElementChildren(NpPtr elemId) +0xffffffff Ranorex.Plugin.ChromeWebChildrenRule.Execute(GlueRuleExecutionState state) +0x99 Ranorex.Core.ElementEngine.ApplyGlueRules(Element element,GlueRuleExecutionStateImpl state,Boolean includeRemotes) +0x6a
------------------------------- This is the last exception I got
No element found for path './/*[@name='Button']' within 30s.
Show/Hide Stacktrace
at Ranorex.Core.Element.FindSingle(RxPath path, Duration timeout) at Ranorex.Adapter.FindSingle[T](RxPath path, Duration timeout) at Cognex.Test.RxCommon.Base.RanorexUtility.GetWebElement(String propertyName, String propertyValue) in C:\BuildAgent\work\75aaa09f68c15bc7\VCSRootFolder\Base\Helpers\RanorexUtility.cs:line 301 at Cognex.Test.RxCommon.Base.RanorexUtility.GetWebElementByElementType(String elementType) in C:\BuildAgent\work\75aaa09f68c15bc7\VCSRootFolder\Base\Helpers\RanorexUtility.cs:line 295 at Cognex.Test.RxCommon.Designer.TestModule.Recipe.EvaluateExecution.Ranorex.Core.Testing.ITestModule.Run() in C:\BuildAgent\work\75aaa09f68c15bc7\VCSRootFolder\Designer\TestModule\Recipe\EvaluateExecution.cs:line 75 at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)
-------------------------------
Code: Select all
private static WebElement GetWebElement(string propertyName, string propertyValue)
{
var webDocument = Ranorex.Host.Local.FindSingle<WebDocument>($"/dom[@domain='{globalParameter.WebPageUrl}']", new Duration(30000));
return webDocument.FindSingle<WebElement>($".//*[@{propertyName}='{propertyValue}']", new Duration(30000));
}
My Chrome version is: 75.0.3770.142
Could you please help us to resolve this problem?