korimo / firewatir

Automatically exported from code.google.com/p/firewatir
0 stars 0 forks source link

IE v Firefox drop-down issue #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the following script to run FireWatir, I obtain an exception error. 
However, the same script using Watir works just fine.

FireWatir Script
======================
require 'firewatir'
include FireWatir

test_site = "http://xyz.com/"

ff=Firefox.new
ff.goto(test_site)
ff.button(:id, "submit").click
ff.link(:text, 'Contacts').click
ff.button(:id, 'createUserAccount').click
ff.select_list(:name, "roleId").select('Business Manager')
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Watir Script
======================
require 'watir'
include Watir

test_site = "http://xyz.com/"

ie=IE.new
ie.goto(test_site)
ie.button(:id, "submit").click
ie.link(:text, 'Contacts').click
ie.button(:id, 'createUserAccount').click
ie.select_list(:name, "roleId").select('Business Manager')

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

What is the expected output? 
The 'Business Manager' is selected from the drop-down list

What do you see instead?
`assert_exists': Unable to locate object, using name and roleId
(FireWatir::Exception::UnknownObjectException)

What version of the product are you using? 
1.1.1

On what operating system?
Windows XP

Original issue reported on code.google.com by restag...@gmail.com on 5 Jun 2008 at 3:35

GoogleCodeExporter commented 9 years ago
Can you provide the HTML code also so that I can test it over here? AFAIK, all 
the
select list test cases ran fine before release. So in case there is some 
different
scenario in your HTML it would be helpful to add that also in the test cases

Original comment by ang...@gmail.com on 6 Jun 2008 at 5:29

GoogleCodeExporter commented 9 years ago
I've attached the HTML code to this comment.  Also, I ran the FireWatir test 
cases
associated with select list after encountering the issue described above, and 
they
worked just fine...so, I guess we can safely say that it is something about the 
HTML
we are attempting to test.

Original comment by restag...@gmail.com on 6 Jun 2008 at 5:05

Attachments:

GoogleCodeExporter commented 9 years ago
I've also included a screenshot of the Contacts page (see attachment), which is
associated with HTML source I sent to you in an earlier posting.

Original comment by restag...@gmail.com on 6 Jun 2008 at 10:49

Attachments:

GoogleCodeExporter commented 9 years ago
I don't think that there is a drop down by this name in the HTML you provided.

Original comment by ang...@gmail.com on 10 Jun 2008 at 6:01

GoogleCodeExporter commented 9 years ago
Correct. Unfortunately, FireWatir appears to click the 'createUserAccount' 
button
(that's the Create Contact button on the Contacts_Page_Screenshot image 
attached to a
_previous_ posting) but does not navigate to the next page that actually 
contains the
drop down.  Please see attached files for the HMTL that contains the 'Business
Manager' selection, as well as a screenshot of the New Contact page. Any help 
with
resolving this issue would be appreciated. Thanks.

Original comment by restag...@gmail.com on 10 Jun 2008 at 3:29

Attachments:

GoogleCodeExporter commented 9 years ago
I've got some more information you...  It appears that if I add a second
"ff.button(:id, 'createUserAccount').click" to my script, then FireWatir and 
Firefox
behave as expected -- that is to say, the button is clicked and the New Contact 
page
is loaded.  However, adding a second statement that is identical to the 
previous one
is not something I'd like to do for all my scripts. Why is FireWatir/Firefox
requiring that I click the button twice in order to get to the next page?

Original comment by restag...@gmail.com on 11 Jun 2008 at 8:42

GoogleCodeExporter commented 9 years ago
I am not sure why this is happening. Because click method should wait for the 
page to
get loaded, otherwise first two clicks should also not work that is:
ff.button(:id, "submit").click
ff.link(:text, 'Contacts').click

Original comment by ang...@gmail.com on 12 Jun 2008 at 5:39

GoogleCodeExporter commented 9 years ago
Hhhhhhmmmmmm...I'm wondering could it have anything to do with how the developer
coded the 'submit' button vs. how he coded the 'Create Contact' button?  
(reference
code snippets below)

Submit Button
-----------------------

<button id="submit" type="submit" class="primaryButton"><span>Sign 
In</span></button>

Create Contact Button
-------------------------

<button id="createUserAccount" class="primaryButton" 
href="/index.php/contact/create"
rel="command"><span>Create Contact</span></button>

NOTE: The additional use of the 'href' and 'rel' attributes in the Create 
Contact
button code!!

Could this be causing the problem?

Original comment by restag...@gmail.com on 12 Jun 2008 at 7:29

GoogleCodeExporter commented 9 years ago
moved to http://jira.openqa.org/browse/WTR-392

Original comment by zeljko.f...@gmail.com on 4 Nov 2009 at 10:29

GoogleCodeExporter commented 9 years ago
Ticket moved to http://jira.openqa.org/browse/WTR. Please see comments for
the exact URL.

Original comment by zeljko.f...@gmail.com on 20 Nov 2009 at 10:39