Daniel Wagner wrote:
> Hi Olivier,
>
> if you're using a locator step like
>
> qx={...}/[...@widgetid="Label"]
>
> the property value is interpreted as a regular expression. Depending 
> on your application's hierarchy, qxh might encounter the 
> "LabeltextField" widget first, which matches the expression so it's 
> returned. Try using a more precise expression like "^Label$".
>
> If that doesn't solve your problem, please post an example of a full 
> locator.
>
>
> Regards,
> Daniel
>
> Olivier ZORO-BI schrieb:
>> Hi everyBody,
>>
>> I face a new problem resolving qx locators with Selenium.
>>
>> I have set a property "widgetId" for all my widgets . When I have two 
>> widgets starting with the same widgetId , Selenium only recognize the 
>> first it finds.
>>
>> example: Label : widgetId = "Label"
>>                 TextField : widgetId = "LabelTextField"
>>
>> Selenium would  never  see  the  widgetId  "LabelTextField"  and  
>> when  indicating  clicking  or  getting  the value of the textField, 
>> Selenium would click or return the Label value.
>>
>> does someone know why?
>>
>> Thanks a lot.
>>
>> Olivier ZORO-BI.
>>                           
>> ------------------------------------------------------------------------------
>>  
>>
>>
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>
>
Hi Daniel,
Thanks for your quick answer.

/ /I use the qxh locator as follow:

  var intField = new qx.ui.form.TextField("");
  intField.seleniumId = "intField";
  var intFieldLabel = new qx.ui.basic.Label("IntField:");
  intFieldLabel.seleniumId = "intFieldLabel";

selenium.click("qx...@seleniumid=fieldswindow]/*/[...@seleniumid=intfieldlabel]");
selenium.type("qxh=*/[...@seleniumid=intfield]", "1111");

As you said, the property value is interpreted as a regular expression, 
and It seems to be the same for qxh locator.
I tried more precise expression with
selenium.type("qxh=*/[...@seleniumid=^intfield$]", "1111");
and It seems to work.
So I'll try to be more precise.

But my "seleniumId" might not have certain characters (*,.,+,|, ...) ?

Olivier.

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to