0

I am using Visual Studio 2010 Ultimate C# for my testing automation. In that I have recorder a Registration module using Coded UI Test Framework.When i click on Registration button another window opens but with not maximized so when i fill the fields i need to scroll down. When recording Scroll are not recorded. So just wanted to know how to scroll down and when a new window opens how to click on Maximized.

1
  • 2
    You need to tag your question with the following: 1) What UI test framework are you using? (2) What programming language are you using. Please also edit your question to include anything you have already tried, and what specifically you need help on? Please also read the guide to asking a good question - writing a good question will give you more and better answers. Commented Mar 22, 2013 at 11:30

3 Answers 3

1

You can maximize the window using the Maximize property of the window. So before filling in the field you can maximize the window which contains the field. For example if you want to maximize the Notepad window after launching then you can do something like following

this.UIMap.UIUntitledNotepadWindow.Maximized = true;

In the above code the UIUntitledNotepadWindow is the top level window of the Notepad.

Sign up to request clarification or add additional context in comments.

Comments

0

The method public void EnsureClickable() is described as "Scrolls the user interface to make sure that the control is clickable."

See http://msdn.microsoft.com/en-us/library/dd434011.aspx

Do not understand the part of he question about "another window opens but with not maximized ... when a new window opens how to click on Maximized". What have you tried, what happened and what do you want to happen? I recommend using the Coded UI record and generate tool, record the opening of the window and maximising it. Then examine the generated code to see how it works.

Comments

0

Once the new window pop's up find the control of the window using 'WinWindow' Class. Once u get the window for ex.

WinWindow objWindow = new WinWindow();
objWindow.searchproperty.add(WinWindow.propertyname.FriendlyName, " Pop name");
objWindow.maximized = true;

And for the control which in not clickable, find in which panel it is coming... once that is done use the panel object to search the control once you get the control write the below code.

objControl.ensureclickable();

Note: Panel will be searched using winwindow object and control using panel or anyother control where it comes.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.