Category: selenium
Automate chrome apps
Chrome apps written using webview are different than iFrames because webview is a separate process. With Selenium 2.20 it is possible to automate chrome apps written using webview. driver = webdriver.Chrome(desired_capabilities={‘chromeOptions’:{‘windowTypes’:[‘webview’]}}) driver.get(‘chrome://apps’) wait_for_new_window_to_appear() driver.switch_to.window(driver.window_handles[1])...
Error retrieving a new session from the selenium server
This is a generic error, there could be many situations which could lead to this. For me, when I updated my Google Chrome and suddenly my automation I hit this error. Here is how...
Connection refused! Is selenium server started?
When you update your Google Chrome version and suddenly when you start running automation you hit the above mentioned error. Solution Get the latest chromedriver (https://sites.google.com/a/chromium.org/chromedriver/) Make sure your automation framework uses the latest...
Selenium and xpath – locate an element using class attribute
Issue : Locate the following element using its Class. <div class=”globalContainer”> <div> … </div> </div> Resolution : You can write the following query in the browser console. $x(//div[@class=”globalContainer”]) Further Reading xPath locator Practical Examples
Selenium and xpath – locate an element using id attribute
Issue : Locate the following element using its ID. <div id=”globalContainer”> <div> … </div> </div> Resolution : You can write the following query in the browser console. $x(//div[@id=”globalContainer”]) Further Reading xPath locator Practical Examples
Recent Comments