Report.Log: how to provide data for "Open In Spy" button
Posted: Tue Jun 11, 2013 11:13 am
Hello,
I have code where I search HTML element and click on it:
It seems that for "Open In Spy" to be shown, the 4th parameter "params IReportMetadata[] metaData" should be set as well. E.g. RepoItemInfo objects can be passed there.
The problem is that since I get my adapter using FindSingle() method I do not have the RepoItemInfo for it. So, my question is:
I have code where I search HTML element and click on it:
public static void ClickOnItem(DivTag root, string itemName) { DivTag item = root.FindSingle<DivTag>(".//div[@innertext='"+ itemName + "']"); Report.Log(ReportLevel.Info, "Mouse", "Click on item: " + itemName + ""); item.Click(); }Now comes the problem with Report.Log(): if I provide only 3 parameters:
- ReportLevel level,
- string category,
- string message,
It seems that for "Open In Spy" to be shown, the 4th parameter "params IReportMetadata[] metaData" should be set as well. E.g. RepoItemInfo objects can be passed there.
The problem is that since I get my adapter using FindSingle() method I do not have the RepoItemInfo for it. So, my question is:
- Is it possible to create RepoItemInfo dynamically either from Adapter or from the RanoreXPath
- Or maybe it is possible to pass some other object as "params IReportMetadata[] metaData". In this case, how can I get it using the information I have (Adapter or RanoreXPath)