Posts

Showing posts with the label webdriver

What is the difference between defaultcontent() and Parentframe() method in selenium webDriver?

Image
What is the difference between defaultcontent() and Parentframe() method in selenium webDriver? What is difference between below two methods : driver.switchTo().parentFrame(); driver.switchTo().defaultContent(); 3 Answers 3 As per the specifications, driver.switchTo().parentFrame(); invokes the following: driver.switchTo().parentFrame(); Where, the Switch to Parent Frame command sets the current browsing context for future commands to the parent of the current browsing context . As per the Java Docs parentFrame() method changes the focus to the parent context. If the current context is the top level browsing context, the context remains unchanged. As per the Java Docs , defaultContent() method selects either the first frame on the page, or the main document when a page contains iframes. That mean for example If i have 3 frames which are nested frames i1, i2, i3. I...

How to handle toast generate in android device while automating an app using appium?

How to handle toast generate in android device while automating an app using appium? I am trying to automate an android app using Appium and Webdriver. When i give invalid credentials to login into the app a toast appears, i want to assert the text of this toast.Also, I can't capture the screen shot of this toast using android uiautomatorviewr. How can i handle toast in android? Any Idea!! Officially you cannot without some major hack arounds. github.com/appium/appium/issues/968 " bootstraponline commented on Oct 2, 2014 It's closed because Google needs to add this to uiautomator. Selendroid works for toasts." – gorbysbm Mar 14 '15 at 18:10 1 Answer 1 Yes it is possible but only using uiautomator2, just pass the argument in the cap...