Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
User interface 在iOS中使用UIAutomation单击选项卡栏上的按钮_User Interface_Ios4_Ui Automation_Ios Ui Automation - Fatal编程技术网

User interface 在iOS中使用UIAutomation单击选项卡栏上的按钮

User interface 在iOS中使用UIAutomation单击选项卡栏上的按钮,user-interface,ios4,ui-automation,ios-ui-automation,User Interface,Ios4,Ui Automation,Ios Ui Automation,我的应用程序中有一个选项卡栏,我必须编写一个JavaScript文件来单击选项卡栏上的按钮,但问题是我找不到关于选项卡栏和UIAutomation的任何相关信息 在我的选项卡栏中有4个按钮,我不知道如何在我必须编写的JavaScript文件中引用我的选项卡栏,因为我使用了navigationbar navBar = mainWindow().navigationBar(); navBar.leftButton().tap(); 但是我找不到与选项卡栏类似的内容。您正在撰写关于选项卡栏的文章,并

我的应用程序中有一个选项卡栏,我必须编写一个JavaScript文件来单击选项卡栏上的按钮,但问题是我找不到关于选项卡栏和
UIAutomation
的任何相关信息

在我的选项卡栏中有4个按钮,我不知道如何在我必须编写的JavaScript文件中引用我的选项卡栏,因为我使用了
navigationbar

navBar = mainWindow().navigationBar();
navBar.leftButton().tap();

但是我找不到与选项卡栏类似的内容。

您正在撰写关于选项卡栏的文章,并试图通过导航栏访问它

请尝试以下代码:

var tabBar = UIATarget.localTarget().frontMostApp().tabBar();
var tabButton = tabBar.buttons()["First"];  
// Tap the tab bar !
tabButton.tap();
教程=>