Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can some one check my code and tell me whats wrong in it.
#1
Not Solved
When i login successfully loop stays on and keep looking for error msg and then throw an error msg.
Cannot identify the object "Please correct the marked field(s) below." (of class WebElement). Verify that this object's properties match an object currently displayed in your application.

Line (15): "
Code:
Browser("World's Largest Professional").Page("Sign In | LinkedIn").WebElement("Please correct the marked field(s) below.").Output CheckPoint("msgerror")".

Tip: If the objects in your application have changed, the Maintenance Run Mode can
help you identify and update your steps and/or the objects in your repository.









Code:
Dim bro,url
bro = "iexplore"
url = "www.linkedin.com"

Systemutil.Run bro,url

For i = 1 To datatable.GetRowCount Step 1
Browser("World's Largest Professional").Page("World's Largest Professional").WebEdit("session_key").Set datatable( "user")
wait 3
Browser("World's Largest Professional").Page("World's Largest Professional").WebEdit("session_password").Set datatable ("pass")
wait 3
'Browser("World's Largest Professional").Page("Sign In | LinkedIn").WebButton("Sign In").Click
Browser("World's Largest Professional").Page("World's Largest Professional").WebButton("Sign In").Click
If Browser("World's Largest Professional").Page("Sign In | LinkedIn"). Exist Then
   Browser("World's Largest Professional").Page("Sign In | LinkedIn").WebElement("Please correct the marked field(s) below.").Output CheckPoint("msgerror")
   Browser("World's Largest Professional").Page("Sign In | LinkedIn").WebButton("Sign In").Click
    Else
             Browser("World's Largest Professional").Page("(14) Welcome! | LinkedIn").WebElement("Account Type:").Check CheckPoint("Account Type:")
'             Browser("World's Largest Professional").Page("(14) Welcome! | LinkedIn").Sync
             Browser("World's Largest Professional").CloseAllTabs
              End If
              Datatable.SetNextRow
Next
Reply
#2
Not Solved
The validation for the below code should include another object which will uniquely identify your condition. ,
Code:
If Browser("World's Largest Professional").Page("Sign In | LinkedIn"). Exist

Code:
If Browser("World's Largest Professional").Page("Sign In | LinkedIn")..WebButton("Sign In").Exist

This will check for the sign in button and if it exists it would mean that there are required fields else, on a successful page it will not have this button.

Helps?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Not Solved
it is not working
Reply
#4
Not Solved
Instead of checking whether page exist after unsuccessfull login by this code If Browser("World's Largest Professional").Page("Sign In | LinkedIn"). Exist
try below
if Browser("World's Largest Professional").Page("World's Largest Professional").WebEdit("session_key").Exist then capture error msg

as you are unable to login then your page still have sign and password webedit.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Wrong column count sqadri 1 2,283 04-19-2012, 09:53 AM
Last Post: sshukla12
  Wrong number of arguments or invalid property assignment qtpro_exe 0 6,604 11-22-2011, 07:48 AM
Last Post: qtpro_exe
  The browser Application can't be launched. Possibly the URL is wrong.- Win.XP-IE 8. fonsecba 2 6,527 05-26-2011, 04:06 PM
Last Post: manmeet.singh81
  Passing syntax check;but ignoring code cocojava 1 2,427 04-25-2011, 05:55 PM
Last Post: Saket
Question .net testing, Object not found on object repository error, what am i doing wrong? ptreey 6 6,822 04-08-2011, 12:25 PM
Last Post: invertednz

Forum Jump:


Users browsing this thread: 3 Guest(s)