automation - Automating a website using Python webdriver. Retrieve IP value of a virtual machine using ifconfig command -


we automating website using python web driver. in website have create virtual machine , access canvas of virtual machine. have check ip address of virtual machine using ifconfig command. able send ifconfig command canvas unable retrieve output of ifconfig.

# selecting vm canvas `ft=driver.find_element_by_id("novnc_screen").find_element_by_id("novnc_canvas")'  time.sleep(20) ft.send_keys("root") #sending user name ft.send_keys(webdriver.common.keys.keys.enter) time.sleep(5) ft.send_keys("secret")  # sending password ft.send_keys(webdriver.common.keys.keys.enter)  time.sleep(10) ft.send_keys("ifconfig") # sending ifconfig command canvas time.sleep(3) ft.send_keys(webdriver.common.keys.keys.enter) time.sleep(3)     driver.close() 

after sending ifconfig command displaying output on canvas . have check through script whether ip coming or not vm, want output of ifconfig file or variable.....

please give me solution this... thank you..


Comments