PhantomJS in python

  • 1 Replies
  • 1609 Views
PhantomJS in python
« on: May 08, 2016, 18:53:19 pm »
I want to run my UI tests without loading a browser.
I read that its possible with PhantomJS

Where can I find a guide on how to use phantomJS with python code ?

Re: PhantomJS in python
« Reply #1 on: February 28, 2018, 13:46:50 pm »
You did nearly everything in your script you need to, the last thing missing is this:

for i in range(10):
    browser.find_element_by_class_name('button').click()
    time.sleep(10)
 
So, instead of sending the enter key, you should just click on it.

When I do a

print(len(browser.page_source))
in between, I get the following results:

75518
89734
104366
119951
Testing it with Firefox, the webpage also loads more.

To know more in detail you can visit JanBask Training or mail at [email protected]

 

Sitemap 1 2 3 4 5 6 7 8