or
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 nullConfirmDialog confirmDialog = ConfirmDialog.CreateConfirmDialog(ActiveBrowser, DialogButton.OK); confirmDialog.HandlerDelegate = new DialogHandlerDelegate(dialog => { var captionWorks = dialog.Window.Caption; var THIS_RETURNS_ZERO = dialog.Window.AllChildren.Count; }); Manager.DialogMonitor.AddDialog(confirmDialog); Manager.DialogMonitor.Start();
/// <summary>/// Tests if clicking the Jira-image opens Jira/// </summary>[Test]public void JiraImgOpensJira(){
Manager.SetNewBrowserTracking(true); frame.Find.ById<HtmlImage>("Jira").MouseClick(); Manager.WaitForNewBrowserConnect("https://someLink.de", true, 2000); //EXCEPTION IS AT THIS LINE
Manager.SetNewBrowserTracking(false); //Assert Jira opened Assert.IsTrue(ActiveBrowser.ContainsText("JiraLogin")); ActiveBrowser.Close(); }[Test]public void SampleWebAiiTest(){ Manager.LaunchNewBrowser(BrowserType.InternetExplorer); ActiveBrowser.NavigateTo("http://vvs.de/"); Find.ById<HtmlDiv>("twitterFCE").MouseClick(); Manager.SetNewBrowserTracking(true); Manager.WaitForNewBrowserConnect("http://twitter.com/VVS#", true, 6000); Manager.SetNewBrowserTracking(false);}var keys = ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("SHIFT+CTRL+ALT+T"); AtlasApp.Manager.Desktop.KeyBoard.KeyPress(keys, 500);Method 2
AtlasApp.Manager.Desktop.KeyBoard.KeyDown(Keys.Control);AtlasApp.Manager.Desktop.KeyBoard.KeyDown(Keys.Alt);AtlasApp.Manager.Desktop.KeyBoard.KeyDown(Keys.Shift);AtlasApp.Manager.Desktop.KeyBoard.KeyPress(Keys.T);AtlasApp.Manager.Desktop.KeyBoard.KeyUp(Keys.Shift);AtlasApp.Manager.Desktop.KeyBoard.KeyUp(Keys.Alt);AtlasApp.Manager.Desktop.KeyBoard.KeyUp(Keys.Control);