Development

I’m using Selenium in my Groovy application as a Maven dependency. Now I’m looking for a way to log the used Selenium Version to the console.
I tried this:
BuildInfo info = new BuildInfo();
def infoString = info.toString();

But infoString only contains:
“Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown'”.
I also tried reading the version from the classpath of the project and though this works in a Java project in a groovy project the classpath no longer contains the used selenium version.
In a java project, the infoString also contains the used version, revision etc.
Any help would be very much appreciated!

I am working on a mobile project, but I got stuck with it, as I cannot Locate any element for this Login pop-up Box through UIAutomator Viewer, the only elements being displayed by the UIAutomator viewer are the web Elements that are beneath the Login pop-up box.

How can I go about identifying the Username, Password input boxes, Sign In button and any other element(s) on this Login pop-up box.

I wonder if there is a way to assert that XML response does NOT contain any other tags than those expected?
I am using plain http requests (no WSDL, schema validation, not SOAP, not REST) and the application protocol is custom for a particular application (POS systems).

I was thinking (and started) of creating a custom SOAPUI library with script that contains:

a reference table
a function that checks if returned tag is on the list (in reference table)

if the returned tag is not on the list, then assertion fails

So, my question is: is there a better way to validate that?
The response XMLs have a lot of fields, some mandatory, some optional and some conditional depending on other (within same request).

While testing Hybrid android app in Appium, a change of context from NATIVE to WEBVIEW is expected. But, the name of the WEBVIEW context does not remain same at all instance of testing. However, it is one of the follwing:

WEBVIEW_undefined
WEBVIEW_{package_name_of_application_under_test}

Say, I’m testing a Hybrid app with package name

com.webviewbrowser

In this case, the context name of the WEBVIEW switches randomly between the following two at every instance

WEBVIEW_undefined
WEBVIEW_com.webviewbrowser

When I use the following in my code,
driver.context(“WEBVIEW_com.webviewbrowser”)

Miserably, I actually receive the context name WEBVIEW_undefined sometimes and NosuchContextException is thrown.
Why does this happen even when no other app is running at the time of testing?
How do I get rid of this issue?

I’m testing a web application in which all web controls are loaded dynamically using AJAX. I have a test script project in java Eclipse IDE.

Here is my problem. If, for example, I am debugging a test script for my last module, I have to go through all my dependent modules first and execute each one’s script before I can debug my last module. It is a very time consuming and boring task to execute the scripts for previous modules every time.

Is there a way I can bypass my dependent module test script execution in Eclipse?

I’m starting to get frustrated with Chrome emulator:
Using JAVA + Selenium + TestNG I’m testing many of our web applications which runs on few browsers. On mobile browser we have a special design – and NOW i’m trying to test it with the Chrome emulator but without great success. I can only load a page and check the elements, BUT I CAN’T click() on it (or other interactions with Actions object).

I’ve tried a simple :

someElement.click()

and

Actions action = new Actions(driver);
action.moveToElement(someElement).click().build().perform();

and both doesn’t work. The run just stays there until the test case gets time out.

Any ideas?
Thanks

I’m writing automation script for a page in which there is a text box. The scenario is as follows:

I click on the text box and enter a value which will throw error
I clear the text box and add valid value and click on confirm button
Then I see the answer provided in the text box as an answer bubble
I click on the edit button to change the answer bubble back into text box
I clear the text box and add new value

In the last step where I need to clear and add new value to the text box, what happens is that the text box is not cleared even when the code is there to clear it. In step 2 it does clear the text box.
public void enterElectricityReading(String electricReading) {
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.elementToBeClickable(electricityField));
electricityField.clear();
electricityField.sendKeys(electricReading);
}

Can someone help me to understand why does the clear code is not run and value is not cleared?
At a certain period when the test is run then the clear method works. But it is not reliable.