Webelement innertext is not case sensitive - 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: Webelement innertext is not case sensitive (/Thread-Webelement-innertext-is-not-case-sensitive) |
Webelement innertext is not case sensitive - san4hex - 05-09-2013 In my application I have two webelements having innertext as 1. veolia transport 2. Veolia Transport - (words V and T are uppercase here) I have used below code to click the object that has innertext "Veolia Transport" Code: browser("index:=0").page("title:=.*").webelement("innertext:=Veolia Transport").Click When I use below code then it is working, Code: browser("index:=0").page("title:=.*").webelement("innertext:=Veolia Transport","index:=1").Click How to make sure that object recognition considers case sesitive. Note: I want to avoid index property. Thanks in advance!! Regards, Sandeep. RE: Webelement innertext is not case sensitive - basanth27 - 05-09-2013 The keyword is called "Regular Expression". Read about it and See if that helps. RE: Webelement innertext is not case sensitive - san4hex - 05-09-2013 Hi Basanth, Code: The keyword is called "Regular Expression". Read about it and See if that helps. Yes I have already tried to solve this using Regular Expression however I could not able to find solution for case senstive issue. Regards, Sandeep. RE: Webelement innertext is not case sensitive - basanth27 - 05-09-2013 Here is a start...build on this block ! Code: Set myRegExp = New RegExp RE: Webelement innertext is not case sensitive - san4hex - 05-10-2013 Sorry, I do not see any fix with the regular expression. I need some fix with QTP based logic. Regards, Sandeep. RE: Webelement innertext is not case sensitive - Saket - 05-10-2013 May be you would like to try Descriptive Programming to get all the webelements, retrieve the innertext, compare and find your desired object. RE: Webelement innertext is not case sensitive - san4hex - 05-13-2013 I cannot change the actual code or logic due to some dependancy. Is there any way to fix this using QTP regular expressions (not VB logic) or any other qtp settings? Regards, Sandeep. RE: Webelement innertext is not case sensitive - basanth27 - 05-13-2013 Apart from index is there any other unique property for that webelement? then you can use that.. |