Hi Guys
I'm hoping someone can help me out on this issue, it's really irritating me, as i've searched around and found nothing to my particular issue
I have a web application that i'm trying to test using Selenium, at some point during use of the app, I need to access an OS-level dialog box for choosing a file to open / import
I'm using Webdriver and C# with TestStack White
my code is as follows
public void ChoosingFileFromImportDataDialog()
{
_driver.Manage().Window.Maximize();
_driver.FindElement(By.Id("expandWorkflow")).Click();
_driver.FindElement(By.Id("upload")).Click();
_driver.FindElement(By.ClassName("qq-upload-button")).Click();
*** When I press the "qq-upload-button" an Open File dialog pops up ****
up to this point it's fine, the below stuff for White is the issue :(
Process pro = Process.GetCurrentProcess(); // get the process for the webdriver (ChromeDriver in my case)
Application app = Application.Attach(pro) // pass the webdriver as an "application"
Window mainWindow = app.GetWindow(SearchCriteria.ByText("Spider"), InitializeOption.NoCache); // Get hold of the browser by looking for it's Title "Spider"
Window modalWindow = mainWindow.ModalWindow(SearchCriteria.ByText("Open"));
modalWindow.Focus();
Button cancel = modalWindow.Get<Button>(SearchCriteria.ByText("Cancel"));
cancel.Click();
However it doesn't seem to work, my nunit runner says that it couldn't find an application with the Title "Spider"
Apologies if it doesn't seem clear, i'm very new to the White framework, I'll certainly try to clarify as best as I can
Thanks In Advance
Umar