or
// Browse to the login pageBrowser.NavigateTo("https://test.somedomain.com/Account/LogOn");// Enter the user name and passwordFind.ById<HtmlInputText>("UserName").Text = "UserName";Find.ById<HtmlInputPassword>("Password").Text = _strongPassword;// Now submit the formFind.ByAttributes<HtmlInputSubmit>("value=Confirm").Click();// Make sure we ended up on the categories page and the login succeededAssert.IsTrue(Browser.ContainsText("Categories / Products"));foreach (HtmlTableRow r in Pages.ClientSideRowSelection.TemporaryRadGridTable1) { foreach(HtmlTableCell c in r.Cells) { Log.WriteLine("Cell found. TextContent:"+c.TextContent); } }<span id="messageText">That´s the text i want to get...</span>var frame = browser.WaitForElement(new HtmlFindExpression("id=rightIFrame"), 10000, false);
var span = frame.Find.ByExpression<HtmlSpan>("id=rightIFrame");
span.Wait.ForExists();
Assert.AreEqual("That´s the text i want to get...", span.TextContent);That´s the text i want to get.."// Initialize the settingsSettings mySettings = new Settings();Manager mgr = null;SilverlightApp app = null;try{ mySettings.Web.EnableSilverlight = true; mySettings.Web.DefaultBrowser = BrowserType.Chrome; // Create the manager object mgr = new Manager(mySettings); // Start the manager mgr.Start(); // Launch a browser instance and navigate to the page mgr.LaunchNewBrowser(); mgr.ActiveBrowser.NavigateTo("http://<;url>/"); // Initialize the Silverlight app app = mgr.ActiveBrowser.SilverlightApps()[0]; // Log into Jovix app.Find.WaitOnElementsTimeout = 20000; app.FindName<TextBox>("txtUsername").Text = "<username>"; app.FindName<PasswordBox>("txtPassword").SetPassword(true, "<password>", 0, 0); app.FindName<Button>("btnLogin").User.Click(); // Get the navigation tree control TreeView navTree = app.FindName<TreeView>("TreeView"); // Navigate to Custom Fields tree view item navTree.Find.WaitOnElementsTimeout = 20000; navTree.Find.ByTextContent("Materials").Parent<TreeViewItem>() .Find.ByType<ItemsPresenter>() .Find.ByName<ToggleButton>("ExpanderButton").User.Click(); navTree.Find.ByTextContent("Custom Fields").User.Click(); // Try to click Add button on the toolbar FrameworkElement dpMain = app.Find.ByExpression( new XamlFindExpression("Name=dpMain")); // this works FrameworkElement dragDockPanelHost = dpMain.Find.ByExpression( new XamlFindExpression("XamlTag=DragDockPanelHost")); // this works FrameworkElement widget = dragDockPanelHost.Find.ByExpression( new XamlFindExpression("XamlTag=WidgetBase")); // this returns null