page-object-gem

Page-object gem: Identifying object with same properties based on their visibility

只谈情不闲聊 提交于 2019-12-02 06:41:36
I have a text box with the following html. The id is dynamic and I cannot use it.I fill some text in the text box. <input type="text" id="117841" class="NEdit" title="MyText" maxlength="20" style="position: absolute; overflow: hidden; font-style: normal; font-weight: normal; font-family: arial; font-size: 12px; text-transform: uppercase; width: 184px; left: 28px; top: 0px; height: 14px;"> There is a Add button and when I click that a New Tab is created. In the new tab, I will have a text box with the same properties above except that a new id is being created. <input type="text" id="118355"

PageObject with Ruby - set text in a text field only works in the main file

安稳与你 提交于 2019-12-02 03:25:38
I'm automating a site that has a page with a list of options selected by a radio button. When selecting one of the radios, a text field and a select list are presented. I created a file (test_contracting.rb) that is the one through which I execute the test (ruby test_contracting.rb) and some other classes to represent my page. On my class ContractPage, I have the following element declaration: checkbox(:option_sub_domain, :id => "option_sub_domain") text_field(:domain, :id => "domain_text") select_list(:tld, :id => "domain_tld") I've created in the ContractPage a method that sets the

Accessing elements from within a iFrame -fails in watir-webdriver 0.6.6 - works fine in 0.6.4

笑着哭i 提交于 2019-12-01 13:49:16
I am trying to select a value in a dropdown which is inside a iFrame. The frame is nested within a table. HTML: <html class ="some text"> <head>...</head> <body id="htmlBody"> <div class= "modalWindow ui-dialog-content ui-widget-content ModalWindow containsFrame" id="ui-id-2"> <iframe src= "/MyApplicantPortal/Applicant/254471/SelectOrderTemplate?t=1"> #document <html class = "some text" <head id= "Head1"> <body id="htmlBody"> <form method= "post" action="SelectOrderTemplate?t=1" id="form1"> <div class = "ModalContent"> <Table> <td class="label1"> <Select id= "MyselList" </td> My code: element(

Accessing elements from within a iFrame -fails in watir-webdriver 0.6.6 - works fine in 0.6.4

≡放荡痞女 提交于 2019-12-01 10:28:24
问题 I am trying to select a value in a dropdown which is inside a iFrame. The frame is nested within a table. HTML: <html class ="some text"> <head>...</head> <body id="htmlBody"> <div class= "modalWindow ui-dialog-content ui-widget-content ModalWindow containsFrame" id="ui-id-2"> <iframe src= "/MyApplicantPortal/Applicant/254471/SelectOrderTemplate?t=1"> #document <html class = "some text" <head id= "Head1"> <body id="htmlBody"> <form method= "post" action="SelectOrderTemplate?t=1" id="form1">

How to avoid Compound Class name error in Page Object?

与世无争的帅哥 提交于 2019-11-27 20:15:42
When I try to use the class name that having space class = "country name" in page object, I'm getting: Compound class names not permitted Selenium::WebDriver::Error::UnknownError) How can I use the class name that having space. Eg: class = "country name" Use a CSS selector instead: .country.name The important thing to note is that this example is wrong! If "country name" is meant as a name of a country, that is. Class names can't have spaces in them. In fact, the class attribute is a space-separated list of classes. That means that if you have a class country name , it's not one class, it's