Welcome! Assume the following example and apply to your test
Keep in mind simple verification points using things like
.wait_until_present(90)
.include?
.present?
.visible?
Very rough sample
require 'watir-webdriver'
ie = Watir::Browser.new(:chrome)
ie.window.maximize()
ie.goto('http://mysample.com')
ie.text_field(:id,'loginInput').wait_until_present(30)
ie.text_field(:id,'loginInput').set('admin')
ie.text_field(:id,lpasswordInput').set('password')
ie.button(:text,'Sign In').click
if ie.text.include?('login error message') then
puts ' - fail bad login'
exit
end
puts ' - you must of logged in....'
puts ' - Here you'd add a fingerprint like is the Welcome div found.'
On Tuesday, February 10, 2015 at 8:28:49 PM UTC-6, Ping-0t wrote:
>
> Good Day All,
>
> I was assigned to do this task and I am wondering if is it possible in
> watir? I was asked to display numbers of errors and the location or line of
> each error in the browser. The error I am talking about are the values I
> input in the browser.
> Example:
> - The password and the username that can LOGIN in the system is :
> username: admin
> password: admin
> It will display no error or success.
>
> But if I input wrong username or password it should display an error then
> it has locate which line the error occur.
>
> If it is possible, how can I do this.
>
> Can you help me guys,
>
> Thanks in advance,
>
> Helfe :)
>
--
--
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/d/optout.