1

i'm working on a project in c# which needs to open browser using selenium and do some job and close it. when i open xx.xx site it will be very vast by the cached data in browser but when it's opening in selenium browser it getting to long to load. is there any way to store js and css file in local computer and add them to selenium browser cache to making it fast ? is it possible at all to making selenium fast ? i googling everywhere and i can not find anything about this. thank for your helping and sorry for my bad english!!

ali.nurozi
  • 11
  • 2
  • There are some cache mechanism available when you use Pagefactory through POM. – undetected Selenium Aug 17 '17 at 06:34
  • @DebanjanB can you explain more ? – ali.nurozi Aug 17 '17 at 06:59
  • You can have a look at this [Discussion](https://stackoverflow.com/questions/43001795/selenium-webdriver-java-how-do-i-store-the-elements-of-an-iframe-in-a-pagefact) and this [Discussion](https://stackoverflow.com/questions/43017058/selenium-java-pagefactory-design-where-do-i-write-my-assertions-following-pa) as well but those are in `Java` – undetected Selenium Aug 17 '17 at 07:17
  • See if you would like to use the re-use session approach? http://tarunlalwani.com/post/reusing-existing-browser-session-selenium/ – Tarun Lalwani Aug 17 '17 at 07:31
  • 1
    You should look at reusing browser profiles. If you are using chrome you should set the value of"user-data-dir" in chromeoptions to a directory and use this to create the webdriver. This way instead of creating a default profile each time the existing profile located at the mentioned directory will be reused along with the cache. – Grasshopper Aug 17 '17 at 08:05
  • @DebanjanB thanks for answering me but this discc nothing to do with my Q – ali.nurozi Aug 19 '17 at 04:23

0 Answers0