Tag Info

New answers tagged

0

Most test runners support running tests in parallel. I am not really into C#, but have a look at these posts: http://blog.yauheni.me/2009/12/design-of-selenium-tests-for-aspnet_19.html http://blogs.msdn.com/b/vstsqualitytools/archive/2009/12/01/executing-unit-tests-in-parallel-on-a-multi-cpu-core-machine.aspx ...


0

You're missing an extra 'if' Something like this should do the trick public static void Main(string[] args) { Console.WriteLine("Insert a number: ); int number = Console.ReadLine(); if (number > 0) { Console.WriteLine("Number is positive"); } else if (number == 0) { Console.WriteLine("Number is 0"); } ...


0

You are missing the brackets in the if-else construction {} Multilines ifs always need brackets The else does not support a new comparison, you need to use else if instead, else will just catch everything else. See the MSDN page about if-else: https://msdn.microsoft.com/en-us/library/5011f09h.aspx static void Main(string[] args) { ...


0

You seem to be trying to select the a tags based on an attribute which is on a font tag. Instead, try the xpath selector //a[@target='SearchFrame'] to select all the links. You can use Driver.SelectElements to return these as an IEnumerable<IWebElement>. Sorry if the selector isn't quite right, I'm trying this on my phone so can't check back to the DOM ...


1

Webdriver is a browser manipulation API only and as such the ability to read office or PDF files is out of scope of its capabilities, but the office interop libraries will allow you to read data from office files in C#, and there will be similar libraries for reading PDF documents.


2

Quickly glanced over the properties and methods of IWebElement, doesn't look like they can set values. However, you can easily execute some javascript snippet to change HTML in your page. IWebDriver driver; IJavaScriptExecutor js = driver as IJavaScriptExecutor; js.ExecuteScript("document.getElementById("title").innerHTML = "New text!";"); You might need ...



Top 50 recent answers are included