Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
648 views
by
edited

Hi Mayur Shah,

Am automating sample for testing android UI.  I want to highlight with red color of currently executing element border same like as UI Automator.

How to achieve this using following languages java, selenium and android driver. 

I have used following code, but its its produced following error => org.openqa.selenium.WebDriverException: Method has not yet been implemented (WARNING: The server did not provide any stacktrace information)

WebDriver driver = new FirefoxDriver();
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("document.getElementById('elementid').focus();");

Given below also not working.

new Actions(driver).moveToElement(element).perform();

My expectation is to highlight every element its like a button, label, text box, dropdown and link anything.

Please Help. Thanks in Advance.

1 Answer

0 like 0 dislike
by
selected by
 
Best answer
JavaScript are ment to be executed on WebBrowser. You can not really execute JavaScript on an Android App.

Apart from this, I doubt that you can highlight elements on an  Android App. Since, Android App is built and its ment to accept only  double clicks, drag and drop, clicks, touch, taps and inputs. I do not think you can change any UI at runtime, since you do not have access to the source.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...