Haich
(Harish Kumar)
April 16, 2018, 1:11pm
1
Scenario: I want to be able to check how many “S” there are and click on each “S” and not click on the same “S” again.
Steps to reproduce:
Current Behavior: At the moment I can get the position of an element but I am trying to get the position of a specific text.
Expected Behavior: What I expect is that I want to find out how many “S” there are on the screen and clicks on the first “S” then does the automation and click onto the second “S” and again after automation clicks on third “S” if there is a third “S”. The “S” varies on each page, on one there could be one and on the second page there could be 2 “S”.
@ddpadil @ovi @Dominic @andrzej.kniola @arivu96 Would you guys have anything in mind?
Greatly Appreciate your help
PD2
(Priya Estevez)
April 16, 2018, 1:33pm
2
Hi @Haich ,
Have you checked the Click Text Activity, you can have your page selected and use the Occurrence property to click based on the occurrence.
1 Like
Haich
(Harish Kumar)
April 16, 2018, 1:47pm
3
Hi @PD2 Thanks for your message, Yes I have tried that but did not seem to work. It keeps on clicking on the same one everytime.
PD2
(Priya Estevez)
April 16, 2018, 2:19pm
4
I’m hoping the selector is an Integer variable.
Haich
(Harish Kumar)
April 16, 2018, 2:30pm
5
Yes it is, any other suggestions you may have?
PD2
(Priya Estevez)
April 16, 2018, 2:36pm
6
Of course, have you looked into Regex to count the occurrences?
PD2
(Priya Estevez)
April 16, 2018, 2:37pm
7
Here are some references:
Hi @somya177 ,
Try this code,
Countword=entirePDF. ToString().Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries).Length
Or
Countword=entirePDF. ToString().Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries).Contains("Development").Length
Regards,
Arivu
Hi,
I’m automating a process that need to count the number of occurrences of a word in a scraped text. For example:
Text: Hi, Maria is working at home, because Maria is a freelance.
In this string, how the robot can know the word Maria is repeated two times?
Thanks for your responses
vvaidya
(Vinay Vaidya)
April 16, 2018, 2:40pm
8
Find Children with Find_Desendents Scope won’t work for you? With below filter
"<webctrl aaname='*s*' />"
Haich
(Harish Kumar)
April 16, 2018, 2:51pm
9
@PD2 I will try it out now and @vvaidya I have tried this but not able to do this. Is there an example you could provide for this please?
jakezap
(Jake Zap)
May 2, 2019, 3:46pm
10
This one works for me. Thanks