WhiteHatBox
Share Page
Following(0)
Partner(s)
max805

Find text on a webpage and Operate it

ReplyThanks 2016/08/30 06:45:04 0 0

Hello,


Please let me know how can I find a text, on a page?

I already used Scraper and Variable Operate, then split string from another site (where I had a full sentence) - to a simple text.


Simple put...How can I find a text (which is a html) on a page, then Control Operate it?


Thank you


zhoucongcq
2016/08/30 23:27:30
You should use FindControl action to find the html element which contains the text.
max805
2016/08/31 15:57:05

Thank you, I tried with FindControl but it works for a html to html, what I need is that the text found and saved to Control, to be searched on another page and Operate it. The text is the same, the one from the first page is just text (no html), the second one is the same text (one word) but has HTML under it, so can be Operated. Can I find and Operate a Control in the second page after I previous saved the text from the first one?


Thank you again


I think it could be about Scraper, to have the text, then send it somehow to a Control Operate on the second page to operate the link (html) under the same text.

zhoucongcq
2016/08/31 22:28:53
I don't know what you want to do. You can only operate the control in current page where you find it.
max805
2016/09/01 00:37:17

Open Page 1 (load URL)

Scrape a body text (not html)

Save the text somehow

Open Page 2 (load URL)

Find that text on this page now (text has html in this page)

Operate it


Can BotChief do this?


Thanks

zhoucongcq
2016/09/01 02:01:06

On page 1, use Scraper to scrape the text and save to a variable.

On page 2, use FindControl to find the html element, you can use variable in Item Seek Condition.

max805
2016/09/01 02:29:42

I think now I'm on the right direction. The problem is that on page 2 the text (also the Html element) are positioned in a list, and everytime it differ the position.

For example,

the "audio " text I saved in a variable, then Open page 2, which is the one I uploaded.

But, now came the difficult part: the "audio" text will be different positioned on that list everytime I will Run the module. (i mean the final Project)


So How can I find and Operate the Html element of text "audio" which will have different position?


thank you


The idea is to use FindControl and look after the "audio" text first, not the Html element, then after find it , Operate the Html under it.




zhoucongcq
2016/09/01 03:48:11
I don't understand your example. You can post the urls and screenshots of the pages to tell us what do you want to do.
max805
2016/09/01 04:35:13

So,

This is just an example (I can not send the actual Urls because for both of them you need username and password access)

But this simulates very well the situation:

1. Load Url Page 1 http://www.ibo.org/about-the-ib/mission/

2. Scrape text "Mission" (the blue one - no Html element)

3. Save text in Variable

4. Open Url Page 2 http://highexistence.com/

5. Control Operate "About" tab

6. Now: In this list, every time The Module is Run, text "Mission" will be positioned in different order.

7. Find text "Mission" in the list, but this time, let's say "Mission" will appear first, on top "Support".

8. Control Operate Html element under "Mission"

zhoucongcq
2016/09/01 05:34:39

I write a module. please check it.

20160901002.dat

<< < 12 > >>
VerifyCode
Advanced Option