Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的网页测试工作室自动化测试用例中,我有一个测试步骤,只需在文本框中输入一些文本。问题是输入后文本立即消失。
当我在 C# 中使用 Selenium Webdriver 时也会发生同样的情况。
你以前遇到过这种情况吗?请给我一些帮助。
在 Test Studio 中尝试关注文本框元素(您可以通过单击元素来完成)并使用以下代码输入文本:
Manager.Desktop.KeyBoard.TypeText("your text here", 50);
在 selenium 中使用 IJavaScriptExecutor 类来设置文本框值。如果它不起作用,请尝试在输入文本框值后单击文本框外的元素。