Can some one check my code and tell me whats wrong in it. - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Can some one check my code and tell me whats wrong in it. (/Thread-Can-some-one-check-my-code-and-tell-me-whats-wrong-in-it) |
Can some one check my code and tell me whats wrong in it. - zakshah.12 - 02-26-2013 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 RE: Can some one check my code and tell me whats wrong in it. - basanth27 - 02-26-2013 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? RE: Can some one check my code and tell me whats wrong in it. - zakshah.12 - 03-05-2013 it is not working RE: Can some one check my code and tell me whats wrong in it. - newqtp - 03-06-2013 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. |