# Can we create string as variable

**URL:** <https://forum.uipath.com/t/can-we-create-string-as-variable/178857>\
**Category:** Help\
**Tags:** variable, selector, question, uiautomation, activities\
**Created:** [December 19, 2019, 10:37am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857 "2019-12-19T10:37:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivanipawar](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@shivanipawar](https://forum.uipath.com/u/shivanipawar)\
**Post date:** [December 19, 2019, 10:37am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/1 "2019-12-19T10:37:51Z")

</div>

i want to make aaname as string variable  
can we do that  
but string is \<webctrl aaname=‘\*Other risk assessment procedures’  
how to make this dynamic

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [December 19, 2019, 10:39am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/2 "2019-12-19T10:39:31Z")

</div>

Hi  
kindly have a view on this thread

> [@How to use variables in selectors in Studio (dynamic selectors) without string manipulation!](https://forum.uipath.com/t/how-to-use-variables-in-selectors-in-studio-dynamic-selectors-without-string-manipulation/154110):
>
> This tutorial will teach you how to easily use variables in your selectors. In other words, we will be making dynamic selectors without the use of the old method of concatenating strings. How cool is that! slight_smile For the purpose of this tutorial, I will make 1 click in the Notepad app. Feel free to also reference our documentation [here](https://docs.uipath.com/studio/v2019/docs/dynamic-selectors). Let’s begin! 1. First, we will indicate the element we want to click on. In this case, it will be File menu in Notepad: [image] This results in the…

Cheers @shivanipawar

---

<div class="post-metadata">

**Author:** ![chaitanya.kulkarni](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/chaitanya.kulkarni/32/464045_2.png) [@chaitanya.kulkarni](https://forum.uipath.com/u/chaitanya.kulkarni)\
**Post date:** [December 19, 2019, 10:39am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/3 "2019-12-19T10:39:49Z")

</div>

Hi,

Try This:\<webctrl aaname=’\*“+YourStringVariableName+”’

---

<div class="post-metadata">

**Author:** ![shivanipawar](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@shivanipawar](https://forum.uipath.com/u/shivanipawar)\
**Post date:** [December 19, 2019, 10:45am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/4 "2019-12-19T10:45:19Z")

</div>

> [@chaitanya.kulkarni](#):
>
> ’\*“+YourStringVariableName+”’

iam getting this error i tried that  
Get Text ‘A’: Cannot find the UI element corresponding to this selector:

---

<div class="post-metadata">

**Author:** ![chaitanya.kulkarni](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/chaitanya.kulkarni/32/464045_2.png) [@chaitanya.kulkarni](https://forum.uipath.com/u/chaitanya.kulkarni)\
**Post date:** [December 19, 2019, 10:47am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/5 "2019-12-19T10:47:32Z")

</div>

@shivanipawar : It means Bot is not able to find the element with that selector, but your case to make aaname dynamic is achieved.

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [December 19, 2019, 10:48am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/6 "2019-12-19T10:48:44Z")

</div>

if you are using latest version then we would be able to create a variable in selector editor itself as per the previous comment  
or  
if its a older version  
then we can mention like  
**’ " + variablename.ToString + " ’**  
make sure that variable has some value in it  
else we will be getting this error

Cheers @shivanipawar

---

<div class="post-metadata">

**Author:** ![shivanipawar](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@shivanipawar](https://forum.uipath.com/u/shivanipawar)\
**Post date:** [December 19, 2019, 11:00am UTC](https://forum.uipath.com/t/can-we-create-string-as-variable/178857/7 "2019-12-19T11:00:53Z")

</div>

so my doubt is  
i want all data from web  
bt there is not export option  
this options are all functionalities if we will click it will open some other stuff  
so i want all the functionalities name in one excel sheet  
i tried everything  
so i got one solution is  
1 image exist activity set as boolean variable if the variable become true it will go to flow decision activity  
once it is true . i am using send hotkey activity pg down  
it will down the page till it reaches to an end  
but after reaching to an end also image exist is showing true  
robot should stop once it reaches to end  
it is keep on running only
