Reputation: 41
I would like to create automated tests for a Qt's app with selenium
+ QtWebDriver
.
I have read the QtWebDriver's wiki, and some questions on stackoverflow
like this one
However, I'm still not able to use QtWebDriver
. I don't understand
how to link selenium
and QtWebDriver
together. there are a lot of
questions that I can't answer.
How can I use Python
to create automated tests for my own Qt's App based on selenium
+ QtWebDriver
?
How can I link my Qt's app with selenium
+ QtWebDriver
?
What is the next step after running webDriver.exe
?
I'd be very grateful if someone could help me or send me a tutorial with an example.
Thanks in advance!
Upvotes: 4
Views: 3062
Reputation: 729
How can I use Python to create automated tests for my own Qt's App based on selenium + QtWebDriver ?
Once the WebDrIver is running with your application you can test it in python like any selenium test, e.g:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Remote(
desired_capabilities=webdriver.DesiredCapabilities.FIREFOX,
command_executor='http://ip_of_webdriver:9517'
)
driver.get('http://example.com/exampleform.html')
# select input
form = driver.find_elements_by_xpath("//input[@name='lastname']")[0]
# PRESS ENTER
form.send_keys(Keys.ENTER)
# etc...
How can I link my Qt's app with selenium + QtWebDriver ?
Upvotes: 1