0

I am automating a wpf windows application. Trying to perform a logout function where I click on the settings icon. A new modal window opens up with several TabItems such as "General", "Security", "Appearance" etc.

I would like to click on the security tabitem which has a textbox "Security". Upon clicking that, a pane adjacent to the TabControl loads with a signout button.

I am unable to get the Security tabitem and unable to click on it. It does not have an AutomationId. So far I can get the TabControl which has all the TabItems within using this:

var tabControl = settingsWindow.Get(SearchCriteria.ByClassName("TabControl"));

But I am unable to select a TabItem and click on the buttons in the Security pane.

1 Answer 1

1

Got it!

var tabControl = settingsWindow.Get<Tab>(SearchCriteria.ByClassName("TabControl"));

tabControl.SelectTabPage(1); // since the tab i want to click on is the 2nd tabitem in the TabControl
Sign up to request clarification or add additional context in comments.

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.