[CodedStep(@"Find and click on course link")] public void FindAndClickOnCourseLink() { string textContent = ((string)(System.Convert.ChangeType(Data["CourseName"], typeof(string)))); HtmlAnchor expectedLink = null; var attempts = 0; while (expectedLink == null) { var rows = Find .ById("activitiesTable") .As<HtmlTable>() .AllRows; expectedLink = rows .Select(row => row.Cells[0].Find.AllByContent<HtmlAnchor>(textContent).FirstOrDefault()) .Where(a => a != null) .FirstOrDefault(); attempts++; //TODO: This is not very elegant but it works, needs something better. if (attempts > 20) { break; } System.Threading.Thread.Sleep(250); } expectedLink.Click(); } }Hi,
I am using WebAii 2011.2.928.
What version of Firefox is supported for Silverlight?
I used the HealthCareDemo test that comes in the sample directory. Both FF 3.6, FF 4.0 and FF5.0
failed, even if their respective addons are installed.
|| FF || AddOn || Result ||
| Firefox 3.6 | Telerik Testing Framework - Firefox 3 + Client 2011.1.0.0 | Failed |
| Firefox 4 | Telerik Testing Framework - Firefox 4 + Client 2011.1.0.0 | Failed |
| Firefox 5 | Telerik Testing Framework - Firefox 4 + Client 2011.1.0.0 | Failed |
Specifically, the test runs and the website http://pjd.mscui.net/PrimaryCareAdmin.htm
loads, but no actions occur. When I set the active browser to IE 7, the test runs.
Q1) Does the AddOn name suggest that there is no addon for client 2011.2?
I'm using Firefox 3 and 4 because of the names of the clients in the AddOns.
Q2) Can I upgrade to the latest Firefox version, 11?
Thanks,
using System;using System.Text;using System.Collections.Generic;using System.Linq;using System.Threading;using ArtOfTest.WebAii.Core;using Microsoft.VisualStudio.TestTools.UnitTesting;namespace ChromeTests{ [TestClass] public class ShowForm { private Settings testSettings; private Manager testManager; [TestInitialize] public void Init() { testSettings = new Settings() { Web = { Browser = BrowserExecutionType.Chrome // works fine if changed to InternetExplorer }, LogLocation = @"c:\testLog.txt" }; testManager = new Manager(testSettings); testManager.Start(); testManager.LaunchNewBrowser(); } [TestCleanup] public void Cleanup() { testManager.Dispose(); } [TestMethod] public void Local() {// works fine if changed to "http://www.google.com" testManager.ActiveBrowser.NavigateTo("file:///D:/TFS/ChromeToolbar/ChromeTests/bin/Debug/TestForms/sample1.htm"); var tdNum = testManager.ActiveBrowser.Find.ById("tdNum"); Assert.IsNotNull(tdNum); Assert.AreEqual("1", tdNum.InnerText); } }}