so with this im going to point out a few things.
the first thing i see is the sleep you should never have toput sleeps in
your code check out watir waiting to get that out of the way later
second your assertion doesnt really help much especially when trying to
figure out what has gone wrong.
assert_equal(true,@wtr.textVerify(Cb_wizard_projecttype_pageverification),
"Navigation to Project Type page is unsuccessfull")
you are asserting that true is equal to the result returned from @wtr.
textVerify(Cb_wizard_projecttype_pageverification which doesn't really
help. but I'm going to guess that it just runs slower on the other machine
so your sleep 5 is not accomplishing what it needs to wait for. again i
would look into watir waiting. you would have probably known this from the
beginning if your assertion was more like
assert_equal("whatever text you are verifying on the project type
page",@wtr.whatever_actual_text_you_are_looking_for, "Navigation to Project
Type page is unsuccessfull")
then your error message would have looked something like
"whatever text you are verifying on the project type page" expected but got
"something else"
which is a lot more meaningful
just my opinion.
On Mon, Feb 17, 2014 at 3:15 AM, AM <[email protected]> wrote:
> My Code is as mentioned below:
> $TEST_BASE= "#{ENV['Name']}" unless defined?($TEST_BASE)
>
> # Required Gems
> require 'rubygems'
> gem "test-unit", "1.2.3"
> require 'watir/testcase'
> require 'test/unit'
> require 'test/unit/ui/console/testrunner'
> require 'ci/reporter/rake/test_unit_loader.rb'
>
> # Required Utilities
> require $TEST_BASE+'/Library/Actions'
> require $TEST_BASE+'/Library/UtilityFunctions'
> require $TEST_BASE+'/ReuseableActions/LoginLogoutHelper'
> require $TEST_BASE+'/ReuseableActions/WizardHelper'
> require $TEST_BASE+'/ObjectRepository/ProjectWizard'
> require $TEST_BASE+'/TestData/testdata'
>
> class TC_6042name < Test::Unit::TestCase
> include CDbaby_Account
> include ProjectWizard
> include Testdata
> def setup
> @wtr=WebTestRunner.instance
> @[email protected]
> @fun=Utilityfunctions.new
> @loginlogouthelper = LoginLogoutHelper.new(@wtr)
> @wizardhelper =WizardHelper.new(@wtr)
>
> end
>
> def test_6042
>
> # Close IE instance(s) if any exist
> @loginlogouthelper.cb_close_app(@props['browser_instance'])
>
> # Navigating to Organizer site using application URL.
> @loginlogouthelper.cb_navigation(@props['browser_
> instance'],@props['env.orgsite.url'])
> @wtr.browser_max()
>
> # Navigating to "Project Type" screen by clicking "Get an instant
> quote" button displayed on "Home" page.
> @wizardhelper.cb_click_startmyproject(Cb_startmyproject_link)
> sleep (5)
>
> #1. Verify that "Project Type" screen is displayed after clicking "Get
> an instant quote" button.
>
> assert_equal(true,@wtr.textVerify(Cb_wizard_projecttype_pageverification),
> "Navigation to Project Type page is unsuccessfull")
>
> # Close all the browsers opened
> @loginlogouthelper.cb_close_app(@props['browser_instance'])
>
> end
> end
> * The Failure is as follows:-
> 1) Failure:
> test_6042(TC_6042Completeartworkusinggraphicdesign) [D:/Tests/TC_
> 6042name.rb:140]:
> Navigation to Project Type page is unsuccessfull.
> <true> expected but was
> <false>.
>
> 1 tests, 1 assertions, 1 failures, 0 errors
>
> On Saturday, 15 February 2014 13:36:58 UTC+5:30, Oscar.Rieken wrote:
>
>> right but what do you see in the console? I don't know what not verified
>> means in your code. It would help if you pasted the exact error you get in
>> the console, and the code you are using in your test. it could be as simple
>> as a timeout or as complicated as who knows.
>>
>>
>> On Sat, Feb 15, 2014 at 2:56 AM, AM <[email protected]> wrote:
>>
>>> I am getting the error that page is not verified however the same
>>> assertion is working on other machine.
>>> Though I have the latest ruby and watir.
>>>
>>> --
>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> [email protected]
>>>
>>> http://groups.google.com/group/watir-general
>>> [email protected]<http://groups.google.com/group/[email protected]>
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Watir General" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>> --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.