原文链接:http://stackoverflow.com/questions/5958075/how-would-i-access-a-pop-ui-button
Question:
I have a pop up button that is triggered by deleting an object. How can I click the button if I can seem to find it.
I have used xpath like so:
$browser.button(:xpath, "/html/body/div/div/div/div/div/div/button").click
Here is a code snippet:
Thanks in advance.
Answers:
Try this:
browser.span(:text => "Delete").click
or
browser.span(:class => "ui-button-text).click
or
browser.button(:class => /ui-button/).click
发表评论
-
Get values from a select list using xpath [closed]
2012-04-04 16:50 0http://stackoverflow.com/que ... -
How do I build Watir tests for websites?
2012-04-04 16:14 0http://stackoverflow.com/que ... -
“TypeError: can't convert String into Integer” when trying to CTRL+click or SHIF
2012-04-04 15:33 0http://stackoverflow.com/que ... -
Using Watir, how can I select a radio control using both name and value?
2012-04-04 15:23 0q http://stackoverflow.com/q ... -
Selecting multiple options in select list with shift
2012-04-04 15:19 0Q http://stackoverflow.com/ques ... -
Drag-and-Drop in Watir
2012-04-04 15:15 0http://www.cheezyworld.com/2010 ... -
How to test onclick in this object without id
2012-04-04 15:13 0http://stackoverflow.com/que ... -
Browser Certificates
2012-04-04 15:01 0http://watirwebdriver.com/b ... -
selected_options returns blank from iframe
2012-04-04 14:48 0link http://stackoverflow.com/q ... -
How to handle tinyMCE when automating with watir-webdriver?
2012-04-04 14:28 0I'm evaluating Watir-webdr ... -
Browser url not returning new url
2012-04-01 17:55 0Qhttp://stackoverflow.com/quest ... -
Can not drive Opera with watir-webdriver on Windows XP
2012-04-01 17:53 0Qhttp://stackoverflow.com/quest ... -
why must I sleep or wait using watir-webdriver and firefox?
2012-04-01 17:50 0Qhttp://stackoverflow.com/quest ... -
Firefox 4 with watir webdriver: Need help using helperApps.neverAsk to save CSV
2012-04-01 17:39 0Q http://stackoverflow.com/q ... -
Watir Webdriver counting number of items in a UL list
2012-04-01 17:22 0Q http://stackoverflow.co ... -
finding the direct child of a tag in watir
2012-04-01 17:13 0Qhttp://stackoverflow.com/quest ... -
How to determine browser type (IE, FF, Chrome, etc.)
2012-04-01 16:59 0Q http://stackoverflow.com/que ... -
Wait methods for watir-webdriver unsuccessful with JS/AJAX and new page load (Er
2012-04-01 16:19 0http://stackoverflow.com/questi ... -
How to send text to a CKEditor WYSIWYG editor box using Watir-WebDriver
2012-04-01 16:14 0Q http://stackoverflow.com/ques ... -
How can I get Browser.text.include? to be case insensitive?
2012-04-01 15:57 0Q:http://stackoverflow.com/ques ...
相关推荐
I present a way to think about access lists and network policy, describe how access lists are built, and give examples of how to apply those access lists in different situations. Along the way, ...
Ok it's cute, But how can I use You just need to add this in your layout. How about click event? In magic button, the click event will work only in second click and you can set this event with:...
1.2.1 How can I get/set an environment variable from a program? 1.2.2 How can I read the whole environment? 1.3 How can I sleep for less than a second? 1.4 How can I get a finer-grained version of...
这是一篇关于如何找到一份体面的工作的英文作文,里面语法非常丰富,是作者的呕心之作
标题中的“Application which shows how to access a password protected A”指的是一个应用程序,它的主要功能是演示如何访问受密码保护的Access数据库。Access数据库是一种常见的关系型数据库管理系统,它由...
perl学习文字版。 1. Introduction ....How Do I Make a Perl Program? 12 A Simple Program 13 What’s Inside That Program? 15 How Do I Compile My Perl Program? 16 A Whirlwind Tour of Perl 17 Exercises 18
This project has you a basic implementation of how to generate a flip-styled pop up view in the iphone. The view is a modal-styled based view. This means that when the pop up view is visible, you can ...
How to build, access and use a MEV TPC for PoCs
You will see how button widgets can fill the width of their containing element, making the layout more consistent. Tabs can be sorted and moved between widgets. You will learn how to do all these ...
by coding all of the application state logic before time, you can instead define what your app’s UI should do in a particular state and let the underlying OS figure out how to do it. What’s more ...
“At the end of the day, I would pound them into oblivion and look forward to the next day when I could recreate the world.” 41 pau l a sch er “ I wanted to make wonderful things, things that ...
4. Could I borrow your car for a few days? 我能借你的车用几天吗? 在这个对话题中,问题的目的是请求借用对方的车。回答C“Sure, here is the key. Enjoy your journey.”表明对方同意借用车。 5. ...
本文档讲述了如何将K2和UiPath两个自动化平台进行集成。K2是一个业务流程管理(BPM)和工作流程自动化解决方案,而UiPath是一个领导级的机器人流程自动化(RPA)软件公司。集成这两个平台可以让用户通过K2表单或工作流程...
2015春七年级英语下册 Unit 4 How do you make a banana milk shake?Period 2导学案(无答案) 鲁教版五四制
2015春七年级英语下册 Unit 4 How do you make a banana milk shake?Period 5导学案(无答案) 鲁教版五四制
2015春七年级英语下册 Unit 4 How do you make a banana milk shake?Period 3导学案(无答案) 鲁教版五四制
2015春七年级英语下册 Unit 4 How do you make a banana milk shake?Period 1导学案(无答案) 鲁教版五四制
With the increasing interest in game development, it's essential to design and implement a UI that reflects the game settings and shows the right information to the player. The Unity system is used to...
How to read a book efficiently. Part one The dimensions of reading Part two The third level of reading Part three Approaches to different kinds of reading Part four The ultimate goals of reading