- Code: Select all
//c# code
webDocument = "*//dom[@pageurl='http://csiboardstage/Pages/CommitmentManager.aspx']";
webDocument.Browser.Activate();
webDocument = "*//dom[@pageurl='http://www.Google.com']";
webDocument.Browser.Activate();
the above same code is not working from Visual studio. (Ranorex studio is giving error some times for the same code. Ranorex is identifying WebDocument only if the web browser is activated). I'm getting the following error when i'm running from visual studio 2008 & 2005.
Ranorex.ElementNotFoundException was unhandled
Message="No element found for path '*//dom[@pageurl='http://www.google.co.in/']' within 5000ms."
Source="Ranorex.Core"
StackTrace:
at Ranorex.Core.Element.FindSingle(RxPath path, Duration timeout)
at Ranorex.Core.Element.op_Implicit(String path)
at Ranorex.WebDocument.op_Implicit(String path)
at SpotLight_CsiBoard.Commitment_Manager.Commnt_Manager() in E:\Thangavel Sundaram\SpotLight\SpotLight_CsiBoard\CommitmentManager.cs:line 39
at SpotLight_CsiBoard.Program.Main(String[] args) in E:\Thangavel Sundaram\SpotLight\SpotLight_CsiBoard\Program.cs:line 13
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Note:
The same code was running fine without any issue when i'm using Ranorex 2.1.2.
Recently i have installed Ranorex 2.1.3. Then only i'm facing this problem.