Hello together,
we still have a chart element (just a bar chart) with severals bars. So we will check the height of each bar, the height is depending from underlying numbers like height of costs or benefits. So we must just test the height with Ranorex. In Spy I saw the attribute height, but if i searched the element with attribut height Spy didn't find the element:
Is it possible to read out the height or check the height?
Chartelement height
Chartelement height
You do not have the required permissions to view the files attached to this post.
Re: Chartelement height
Hi,
You can access these values from code (as shown for example here), but I don't think you can use them in xpath.
You can access these values from code (as shown for example here), but I don't think you can use them in xpath.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Chartelement height
Thanks for your anwser. I tried but I had no success:
I replaced the marked area in following code:
int objX, objY, objW, objH = 0;
objX = repo.DeadCentre.Rectangle.Element.ClientRectangle.X;
But Ranorex didn't konw the method Rectangle, than I tried with
objX = repo.DeadCentre.ClientRectangle.X;
Some problem.
Than I tried with:
objX = repo.DeadCentre.Layout.ClientRectangle.X;
and
objX = repo.DeadCentre.X;
some problem. Ranorex don't know the method , Layout, X or ClientRectangle.
Do you have some tipps for me? Some instructions?
I replaced the marked area in following code:
int objX, objY, objW, objH = 0;
objX = repo.DeadCentre.Rectangle.Element.ClientRectangle.X;
But Ranorex didn't konw the method Rectangle, than I tried with
objX = repo.DeadCentre.ClientRectangle.X;
Some problem.
Than I tried with:
objX = repo.DeadCentre.Layout.ClientRectangle.X;
and
objX = repo.DeadCentre.X;
some problem. Ranorex don't know the method , Layout, X or ClientRectangle.
Do you have some tipps for me? Some instructions?
Re: Chartelement height
OK, please upload a Ranorex snapshot (not screenshot) of the problematic element. Ideally, if possible, upload also a small sample app featuring the element in question. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Chartelement height
I foun dthe solution:
int objX = repo.yyy.xxx.Element.ClientRectangle.X;
Problem solved.
int objX = repo.yyy.xxx.Element.ClientRectangle.X;
Problem solved.
Re: Chartelement height
Good to hear that!
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Chartelement height
I didn't get a value:
Attribute 'Element.ClientRectangle.X' of element for item '{LiTag:42}' does match the specified value (actual='(null)', expected!='420').
Attribute 'Element.ClientRectangle.X' of element for item '{LiTag:42}' does match the specified value (actual='(null)', expected!='420').
Re: Chartelement height
Could you please post entire (relevant) code? And as mentioned, snapshot would be nice too. Without seeing the code and snapshot, it's hard to say what's wrong.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Chartelement height
I can not create a reportitem for the report:
Report.Log(ReportLevel.Info, "Validation", "Ja",repo.WebDocumentWikoWebTESTER2.LiTag42Info, new RecordItemIndex(13));
Validate.Attribute(repo.WebDocumentWikoWebTESTER2.LiTag42.Element.ClientRectangle,"X",11);
Report.Log(ReportLevel.Info, "Validation", "Ja",repo.WebDocumentWikoWebTESTER2.LiTag42Info, new RecordItemIndex(13));
Validate.Attribute(repo.WebDocumentWikoWebTESTER2.LiTag42.Element.ClientRectangle,"X",11);
Re: Chartelement height
all OK, I found the solution.