我已经使用了WindowsPhoneTestFramework并且很棒,但它不支持我需要的一些功能,比如设置更改模拟器布局的元素的宽度和高度以在横向和纵向测试,等等。由于某些原因,尝试添加简单的命令如宽度和高度时,它不起作用,因此需要调试AutomationClient。 例如,我需要看看在WindowsPhoneTestFramework.Client.AutomationClient.Remote中创建的SetWidthCommand中发生了什么,并理解为什么该属性在测试中的应用程序中未更新。调试WindowsPhoneTestFramework AutomationClient
我创建了SetWidth命令,并从像控制台呼叫:setWidth ID = widthValue
我可以调试,直到我得到的地方,创建与 AutomationIdentifier的命令和值和SyncExecuteCommand后,我得到的ApplicationAutomationController结果作为false.This意味着什么是错的客户端,让我怎么调试Client.AutomationClient.Remote 的SetWidthCommand这是Client.AutomationClient.Remote
的SetWidthCommandpublic partial class SetWidthCommand
{
protected override void DoImpl()
{
var element = GetUIElement();
if (element == null)
return;
if (AutomationElementFinder.SetElementProperty(element, "Width", Value))
{
SendSuccessResult();
return;
}
//setWidth ContentPanel 400
if (ValueCommandHelper.TrySetValue(element, Value.ToString(CultureInfo.InvariantCulture)))
{
SendSuccessResult();
return;
}
// if width is missing... then give up
SendNotFoundResult();
}
谢谢。
can ypu可以解释更多关于'你不工作'的含义吗?编辑问题以解释发生了什么 - 您是否看到异常?它不启动?它是否开始,但没有达到断点?将尽力帮助:) – Stuart
你问什么问题?对于提问和回答问题,Stackoverflow非常出色。请不要留下评论,而是编辑文本以提出问题 - 一个说“为什么?”,“如何?”或“什么?”的句子。 (我正在尝试帮助 - 老实说!) – Stuart
我仍然不确定你的问题是什么......但我试图解释下面的一些观点 - 如果这些都无济于事......请问一个“如何? “问题 - 因为我真的不明白你在问什么: – Stuart