My workflow includes reading two columns which is field1 and field2.
I have to search the field1 in a web application and update the value of field1 with field2
I searched for field1 using ctrl+f but when I do that the similar words which are almost equal to field1 are also selected.
I tried using anchor base but in for each loop it doesn’t work as intended.
Can anyone suggest how to select the exact field1 and update it…
Please share the screenshot of the application which you are trying to automate?
Also here field1 is that a text box?
It would be better if you explain with a screenshot
I might not be able to share the application.
Just an example:
String1 will have some value in the text box.
So string1 and it value is pulled from Excel and then I need to search for String1 and append its value in the text box with the new value.
Sample of how it looks in my application
If the list in the excel is changing what you can do is you can create a switch case. So if the value from excel is string3, then it has first read the value from string3 filed and then use a assign activity to append with the value from excel. Then use typeinto activity to write.
first thing what you need to do is , inspect on any 2 fields and check whether some attributes are there which shows the label name. like aaname=String1 or aaname=String2.
If it is there, you can make the process dynamic.
I should be searching for the string1 from my excel in my web application and then make the changes to its value (which is also from the excel)
Understood… But is the list from the excel the same or will it change?
Like next day string3 willnot be there in the excel list. Is there any criteria like that? Also how many fields are there?(like string1,string2 etc)
Yes the excel list will change. There are only two columns in Excel with the string and its value but rows are indefinite.
So it should search for each string(from Excel) in the web application and update its value (from the excel).
I hope this helps?
Also , i tried using anchor base with find element and type into … not much luck as it is not finding the exact string what is mentioned in excel
it should search means it should identify the field. So you need to idenfy the attribute which can be used in the selector.
As you confirmed the list is not static , you will have to dynamically identify the fields to TypeInto.
So use uiexplorer and inspect on the field and share the ss here.
I used for each row in datatable and Find Element activity and tried to click on the element and do a tab to go to the text box to update the value .
But it doesn’t work .
For the selector part I did aaname=* which is unique in this
Plz share the selector from Ui explorer
I might not be able to send the selector. The aaname is the only field which is unique I updated it as * .
But it goes to a different text box and updates the value. It doesn’t select the exact match instead selects any word which is similar.
If you give it as * it will not select the proper value
Since the values from Excel are different I cannot give a constant for it.
No… If you are getting g the value from excel you need to pass that value as aaname to the selector.
Thus you can make your selector dynamic
The aaname=Horizontal is the value what I see in my selector .
If string1 I need to update its value but in the same web I have string1_la string1_la2 . I should be able to select string1 only irrespective of its occurrence .Is there any method which can do that ?
i htink you are getting the value of string from excel, if yes why dont you read the excel and pass that variable to the selector.
You can use a for each row in datatable and get the string values and pass that to the selector.
I tried the below steps:
1.Read the excel which has the text and its value.
2. For each row in datatable , search the Text in Web and double click on it .
3. Tab to the corresponding textbox and update it.
But the issue is if there are similar texts like string1,string1_1,string1_2 so it randomly clicks on any of them wherein it has to select only string1 and update its value which is expected.
So if i set the occurrence property=1 it takes up any similar string which comes first and clicks on it.
share the ss of the workflow which you created and the selector in the click activity.
Please have a look at this
In my web whenever I select an word for click this is the selector I have.