Letractively / aost

Automatically exported from code.google.com/p/aost
Other
1 stars 0 forks source link

Regular expression support for Tellurium 0.7.0 #265

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As we already knew that '%%' is deprecated in tellurium and now these wild
chars('!', '^', '$','*') have to be used, but those doesn't seem to be working.
Any help with a working example would be appreciated.

My Scenario,
I have a list of repeating UI elements(same ui element, say a textbox,
repeated for each 'li') and each has a unique name something like
'textbox[0]', 'textbox[1]', 'textbox[2]' with a different index. 

So instead of defining 3 different elemets, I thought of doing something like
   clocator:[name:'textbox[*]'] or any other wild char....
which doesn't seem to be working.

So, finally I introduced a variable(say index), and changed the value
depending on the element I want call and redefining the UI every time with
the new value, which seems to be working fine.

Now that I got a work around for my problem, I want to get the wild chars
thing working, so that I need not have to worry about something like this
for my future implementations.

My Environment: Mac 10.5.8, FF 3.5.3

Original issue reported on code.google.com by bala.tel...@gmail.com on 22 Sep 2009 at 9:24

GoogleCodeExporter commented 8 years ago
Right now, Tellurium only accept "*" at the begin of the string, i.e., 
"*textbox" in
your case. This is due to the limitation from native XPath library and jQuery
selector attribute selector. To support more complicated syntax such as 
"textbox[*]",
we have to support regular expression in Engine. Will consider your suggestion 
and
see how difficult to add such support.

Original comment by John.Jian.Fang@gmail.com on 23 Sep 2009 at 1:09

GoogleCodeExporter commented 8 years ago

Original comment by John.Jian.Fang@gmail.com on 23 Sep 2009 at 1:10

GoogleCodeExporter commented 8 years ago
Appreciate your response. The * seems to be working in the middle to sometimes. 
Well
not sure when it works and when not.
Thanks again for all your efforts.

Original comment by bala.tel...@gmail.com on 24 Sep 2009 at 5:27

GoogleCodeExporter commented 8 years ago
Sorry for the confusion. '!', '^', '$','*' must be the first character of the 
partial
matching String to make it work, for example, "*YOUR_STRING". You are welcome 
to post
all your questions to our user group at

http://groups.google.com/group/tellurium-users

so that more people could benefit from the discussion. 

Thanks,

Jian

Original comment by John.Jian.Fang@gmail.com on 24 Sep 2009 at 7:28

GoogleCodeExporter commented 8 years ago
http://james.padolsey.com/javascript/regex-selector-for-jquery/

Original comment by John.Jian.Fang@gmail.com on 28 Sep 2009 at 8:31

GoogleCodeExporter commented 8 years ago
http://code.google.com/p/aost/wiki/UserGuide070AppendixB#How_to_do_Attribute_Par
tial_Matching_in_Tellurium

Original comment by John.Jian.Fang@gmail.com on 23 Nov 2009 at 6:45