![]() |
Descriptive Programming By giving the description in form of the string arguments - 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: Descriptive Programming By giving the description in form of the string arguments (/Thread-Descriptive-Programming-By-giving-the-description-in-form-of-the-string-arguments) |
Descriptive Programming By giving the description in form of the string arguments - sia sharma - 09-04-2012 Hi All I m writing a code for a website. where i want to prove the occurence of a element many times. i don't want to add that element into object repository. so i m using Descriptive Programming By giving the description in form of the string arguments. this is my code, Code: Browser("abc").Page((DataTable("pageName", dtGlobalSheet))).WebElement("title:=Amitabh Bacchan","html tag:=DIV","class:=ab_pointer").Exist Is this the right way to do this? RE: Descriptive Programming By giving the description in form of the string arguments - sshukla12 - 09-04-2012 Hi, Have u added the page object in OR, if not then pass the values as title instead of simply specifying the name as u did .Page((DataTable("pageName", dtGlobalSheet))) Regards, Sankalp RE: Descriptive Programming By giving the description in form of the string arguments - sia sharma - 09-04-2012 yes I have added the page object in OR, and not using title attribute bcoz the page name is not static. Code: .Page((DataTable("pageName", dtGlobalSheet))) One more thing i want to prove that WebElement exists This is my code: Code: Browser("acb").Page((DataTable("pageName", dtGlobalSheet))).WebElement("html tag:=DIV","class:=ab_pointer").Exist the webelemt is having only 1 unique property that is "display none/block" how to deal with this property in qtp ? RE: Descriptive Programming By giving the description in form of the string arguments - sshukla12 - 09-04-2012 Hi, Are u able to identify the webelement using htnl tag and class???? Regards, Sankalp RE: Descriptive Programming By giving the description in form of the string arguments - sia sharma - 09-12-2012 Hi All can anyone tell me that how to deal with changing page name while using descriptive programing? this is my code Code: Browser("sdsd").Page("dsd").Link("html tag:=A","text:=Report Abuse").Exist Thanks sia RE: Descriptive Programming By giving the description in form of the string arguments - Ankesh - 09-12-2012 why dont you use regula expression??? Try this Code: Browser("title:=sdsd").Page("title:=.*").Link("html tag:=A","text:=Report Abuse").Exist Regards, Ankesh RE: Descriptive Programming By giving the description in form of the string arguments - freeboynil - 09-12-2012 Code: Browser("title:=sdsd").Page("title:="&datatable("a",dtglobalsheet)).Link("html tag:=A","text:=Report Abuse").Exist Code: a=datatable("a",dtglobalsheet) |