Tag Info

New answers tagged

2

As the Datepicker is not your code you don't need to test it's functionality, so what I would do is write a JavaScript snippet that sets it to the required value, then execute that in the browser.


0

Quickly written block of code that navigates here and logs in using your code and it works. Your problem likely exists elsewhere in your code. static void Main(string[] args) { var binary = new FirefoxBinary(@"C:\FirefoxPortable\FirefoxPortable.exe"); var profile = new FirefoxProfile(); var driver = new ...


0

We did it the same way using C#. Unless it is really slow I would leave it like this. The only suggestion I would have would be to give each cell a unique identifier so you can use the quick "by id" locator. You could also check that the MAX+1 rows / columns don't exist if you want to be really rigorous.


0

You need to switch to the window and then perform whatever you are going to perform on the child window. Though I am not familiar with C#, this is how I would try: btn1=driver.find_element_by_id('ucTicketDetail1_btnClose') #guessing this is the id of button that triggers the webpage dialog to open btn1.click() newWindow=driver.window_handles[1] ...


0

Does anything change on the page when the file has loaded? If it does then explicitly wait for that change to occur. I've got a packaged method in my common library that I employ in these situations (packaged so I don't need to write the entire code each time) with a default timeout set to a value that I'd reasonably expect the action to be completed ...


1

Don't use Thread.sleep or ImplicitlyWait. The best way to wait something is explicit wait. Try to use new WebDriverWait(driver, 60).until(new ExpectedCondition<Boolean>() { @Override public Boolean apply(WebDriver webDriver) { return // check if file downloaded } ...


2

Just use an Excel library to load data from Excel files and use that data in your Asserts? C# and Excel: http://stackoverflow.com/questions/657131/how-to-read-data-of-an-excel-file-using-c C# and Asserts: https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.aspx



Top 50 recent answers are included