Jul-09-2021, 11:44 AM
Hello,
I need to develop a code that navigates to a website and then finds all possible pages on the site and clicks on them. Also, I would like it to open any file attachments and then close them. Pages are layered (i.e. clicking one page will lead to more/new pages to open).
Selenium seems like the obvious choice and I have a code to login and could manually go to pages via xpaths, but there are too many pages to hardcode each page. I have seen a few people talking about similar projects, but nothing seems to correlate.
xpath examples from the site:
//*[@id="site-subnav"]/div[2]/div/div[1]/nav/ul[2]/li[1]/div/div/div[2]/div/span
//*[@id="infobar-290_1"]/div/div[3]/div/a
pdf file xpath example: //*[@id="item-45"]/div/div/div/div[4]/section/div[2]/div[2]/div[3]/div[2]/div/div[2]/a
I can provide more info as needed, but at this point I just need to know where to start.
I need to develop a code that navigates to a website and then finds all possible pages on the site and clicks on them. Also, I would like it to open any file attachments and then close them. Pages are layered (i.e. clicking one page will lead to more/new pages to open).
Selenium seems like the obvious choice and I have a code to login and could manually go to pages via xpaths, but there are too many pages to hardcode each page. I have seen a few people talking about similar projects, but nothing seems to correlate.
xpath examples from the site:
//*[@id="site-subnav"]/div[2]/div/div[1]/nav/ul[2]/li[1]/div/div/div[2]/div/span
//*[@id="infobar-290_1"]/div/div[3]/div/a
pdf file xpath example: //*[@id="item-45"]/div/div/div/div[4]/section/div[2]/div[2]/div[3]/div[2]/div/div[2]/a
I can provide more info as needed, but at this point I just need to know where to start.