-2

how to measure the time taken by the reports to display data embedded in an iframe of webpage?

I have used time.sleep() function earlier. but i have to record the report loading time.

browser.get('https://public.tableau.com/profile/ifpri.td7290#!/vizhome/2014GHI/2014GHI')
browser.get('https://public.tableau.com/en-us/s/gallery/books-made-movies?gallery=votd')
James Z
  • 12,209
  • 10
  • 24
  • 44
Chaitanya Lp
  • 19
  • 1
  • 5
  • based on your answer i got to know that i have to use selenium.webdriver.support.expected_conditions. is it correct? in my urls you could see there is an iframe and it will load the data into report with some delay. – Chaitanya Lp Jun 03 '18 at 11:01

2 Answers2

-1

I don't know how the hole code looks but if you begin with from time import sleep theres no need to begin with time.sleep().

Druta Ruslan
  • 7,171
  • 2
  • 28
  • 38
  • here is my code. if you look at the URL's there is an iframe that holds the report. one spinner appears before report show the data. how to measue that time? class MyThread(threading.Thread): def run(self): browser = webdriver.Chrome('C:\Chrome Driver\chromedriver') try: browser.get('https://public.tableau.com/profile/ifpri.td7290#!/vizhome/2014GHI/2014GHI') browser.get('https://public.tableau.com/en-us/s/gallery/books-made-movies?gallery=votd') finally: print(time.ctime() + "Quit") time.sleep(1) – Chaitanya Lp Jun 03 '18 at 11:07
-2
from selenium import webdriver

driver = webdriver.Firefox()
driver.implicitly_wait(10) # seconds
driver.get("http://somedomain/url_that_delays_loading")
myDynamicElement = driver.find_element_by_id("myDynamicElement")`
James Z
  • 12,209
  • 10
  • 24
  • 44
Azimjon Pulatov
  • 101
  • 2
  • 7