Page 1 of 1

Supplying Values to Multiple Repository Attributes

Posted: Tue Jun 14, 2016 5:18 pm
by mcs
Hi,

I am attempting to set values in User Code for a repository item which is a calendar date; the attributes that I need to set are title and innertext.

My repository item is named PickDate with an xpath of body/div[5]/div[@title='All Day' and @innertext='22']

I can successfully select the date in my code when the title and innertext values are hardcoded as they are above but, when I set the values to $dayPortion and $day, I can't seem to figure out how to populate both values with my code so that the specified date is selected. I would think that this would be easy to accomplish but I must be missing something.

Thanks for any help, hints, words of encouragement, etc....
Mike

Re: Supplying Values to Multiple Repository Attributes

Posted: Wed Jun 15, 2016 8:18 am
by odklizec
Hi,

Please post a Ranorex snapshot (not screenshot) of the problematic element.

At next, I think this post is more or less related to your previous post here...
http://www.ranorex.com/forum/retrieving ... tml#p38407
You should not use non-persistent attributes to identify elements in repository. Or you should replace the hardcoded string with variable, which must be filled with correct string BEFORE you access the element. For example via data connector. Please take a closer look at Data Driven testing chapter in Ranorex user guide...
http://www.ranorex.com/support/user-gui ... sting.html

Re: Supplying Values to Multiple Repository Attributes

Posted: Wed Jun 15, 2016 7:19 pm
by mcs
I was able to figure this out today... really don't know why I had hit a roadblock on it. I am now successfully supplying a title and innertext value in my code to select a specified divtag date in a divtag calendar in a foreach loop inside another foreach discovery loop of the calendar members.

Thanks,
Mike