Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot combine control properties to locate element accurately #113

Open
WeiweiCaiAcpt opened this issue Nov 12, 2024 · 0 comments
Open

Comments

@WeiweiCaiAcpt
Copy link

WeiweiCaiAcpt commented Nov 12, 2024

When using FlaUI.WebDriver write UI testing, we found that if different element type has the same name, it cannot be located accurately.
For example, if there is a Label and a Textbox, both of them named "Phone Number". When use driver.FindElementByName(), both of them will be returned. So we have to use driver.FindElementsByName() to find both of them first. Then use index to select which element we want to operate.

var phones = driver.FindElementsByName("Phone Number");
phones[1].SendKeys("123456789");

In Coded UI, the logic of searching elements is combine the control's properties to locate it. If we want to find the Textbox, the Coded UI will use both Control Type and Name to find it.

Do you have any good idea for this scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant