Software Engineering

I have Jquery calender in my application. I have task to select dates from different months using Selenium, but I can do only previous month and forward month. Actually I need to select dates from random months by specifying the date and month as input. If there is a way to achieve it let me know.

**My code for Selecting Previous Month date.**

public static void Date_Picker(String datetoselect,String Xpath,String month) {
// Click on the Given Calender Button
driver.findElement(By.xpath(Xpath)).click();

driver.findElement(By.xpath(“//div[@id=’ui-datepicker-div’]/div/a[1]”)).click();

WebElement Month = driver.findElement(By.xpath(“//div[@id=’ui-datepicker-div’]/div/div[@class=’ui-datepicker-title’]/span”));
String Month_Message = Month.getText();

if(Month_Message.contains(month))
{
WebElement dateWidget = driver.findElement(By.className(“ui-datepicker-calendar”));

List<WebElement> rows=dateWidget.findElements(By.tagName(“tr”));

List<WebElement> columns=dateWidget.findElements(By.tagName(“td”));

for (WebElement cell: columns){

if (cell.getText().equals(datetoselect)){

cell.findElement(By.linkText(datetoselect)).click();
break;

}
}
}

We are trying to get our automated webtests working independently of what version of Chrome we’re using. These automated tests work as follows:

We have a Karaf container agent running as a service;
Karaf starts an ant script, which in turn starts another ant script. The first ant script is part of the automation tool we use (our own product) and the second ant script is the actual script that starts our testng webtests;
TestNg, during the startup, starts the ChromeDriver in the following way using the bonigarcia Webdrivermanager library:

WebDriverManager.chromedriver().setup();
// webDriver = new ChromeDriver();
ChromeOptions options = new ChromeOptions();

// ChromeDriver is just AWFUL because every version or two it breaks unless you pass cryptic arguments
//AGRESSIVE: options.setPageLoadStrategy(PageLoadStrategy.NONE); // https://www.skptricks.com/2018/08/timed-out-receiving-message-from-renderer-selenium.html
options.addArguments(“–enable-automation”); // https://stackoverflow.com/a/43840128/1689770
options.addArguments(“–headless”); // only if you are ACTUALLY running headless
options.addArguments(“–no-sandbox”); //https://stackoverflow.com/a/50725918/1689770
options.addArguments(“–disable-infobars”); //https://stackoverflow.com/a/43840128/1689770
options.addArguments(“–disable-dev-shm-usage”); //https://stackoverflow.com/a/50725918/1689770
options.addArguments(“–disable-gpu”); //https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc
options.addArguments(“–window-size=1920,1080”);
options.addArguments(“–start-maximized”);
options.addArguments(“–disable-extensions”);
options.setExperimentalOption(“useAutomationExtension”, false);
options.addArguments(“–bwsi”);
options.addArguments(“–user-data-dir=”+ System.getProperty(“test.web.chrome.data.dir”) +”/user-data-dir”);
options.addArguments(“–disk-cache-dir=”+ System.getProperty(“test.web.chrome.data.dir”) +”/disk-cache-dir”);
try {
File logFile = new File(System.getProperty(“test.web.chrome.data.dir”).replace(“/”, “\”) + “\logs\chromedriver.log”);
logFile.getParentFile().mkdirs();
logFile.createNewFile();
boolean verbose = System.getProperty(“test.web.webdriver.verbose”).equals(“true”);
ChromeDriverService driverService = new Builder().withVerbose(verbose).withLogFile(logFile).build();

webDriver = new ChromeDriver(driverService, options);
} catch (IOException e) {
LOGGER.error(e);
webDriver = new ChromeDriver(options);
}

The problem we have is that if the Karaf agent is running as the LOCAL_SYSTEM account (which is the default user when creating a new service), the Chromedriver can’t start Chrome with the error:

unknown error: cannot create temp dir for unpacking extensions

After some googling and testing, I’ve found this is because when starting the ChromeDriver, it tries to create a temporary folder for unpacking extensions in the user temp directory, which fails because the LOCAL_SYSTEM account doesn’t have a user directory.

I can work around the issue by making the service run as a LOCAL_SERVICE account, which does have a user directory, but we’ve found that some other scripts that run on this Karaf agent give problems when running as LOCAL_SERVICE (mainly older software integrations that we can’t easily upgrade), so ideally I’m hoping for a solution that makes LOCAL_SYSTEM work.

Is there a way to fix the temp dir problem that the Chromedriver has when attempting to start Chrome from a LOCAL_SYSTEM service?

In my college, I learned about Integration testing in which we combine the whole code together and then test it at once after we are done with unit testing.

A few days back, I heard about Jenkins, which says it does Continuous Integration Testing. I read about it and learned that it means that a developer pushes his/her code several times a day to Jenkins for testing instead of sending the code at the end of the day.

I was confused so I went to read about it from Wikipedia but it didn’t help. I read the two links below

Integration testing

Continuous integration

ELI5

What does this all mean?

What is the difference between Regular Integration Testing and Continuous Integration Testing?

How do I find the element with text “Jessica” based on “3000” displaying in the web page using xpath?
I’m getting …not a valid xpath error.
<div>
<span><b>Jessica</b></span>
<br>
<label>Total Wealth ($):</label>
<p>3000</p>
</div>

I tried this
RichestPersonName = browser.find_element_by_xpath(“//p[text()=’3000′] .. /span”).text

but it shows
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //p[text()=’3000′] .. /span because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string ‘//p[text()=’3000′] .. /span’ is not a valid XPath expression.

Is there any mobile cloud testing service for Android offering enhanced location capabilities? My requirements are:

Playback of recorded GPS/location data
GPS data needs to be provided as ‘real’ data, not as (recognizable) mock data
ARM only app, so emulators are probably not an option

I haven’t found a service yet that offers location capabilities beyond setting a static location before each test run. Is there any service out there that meets my requirements?

I have a small confusion about decision table testing. We basically use decision tables to arrive at various possible combinations and then decide what conditions need to be tested and what need not be tested. But how decision table will help in checking invalid conditions? How do we decide how many invalid conditions have to be tested?

Assume I have below decision table. The requirement says if Blower State is OFF, AC request state shall be OFF and Air Condition state shall be OFF. Ambient temperature condition in this case is don’t care. So obviously I need not test with more than one set of data when blower state is OFF. That is why I have considered only one case for blower state OFF condition.

Similarly if AC User Request State is OFF, temperature condition is don’t care. So I have put only one case with AC user request OFF.

So totally I arrived at 4 test cases instead of 8 test cases, considering all combinations.

Now my question is: To check the robustness of the system, don’t we need to keep the blower in OFF state and (Ambient temperature > user request temperature) and test that Air conditioning system is OFF?

Similarly don’t we need to keep the ambient temperature > user request temperature and test for air conditioning system when AC User request is OFF?

There may be several other negative testing scenario like this. How do we select negative test scenario also using decision table?

x in below table indicates don’t care condition.

Quick commerce is revolutionizing the FMCG and eCommerce industries by enabling rapid delivery and enhancing customer experience. The blog discusses how this transformation is driven by integrating advanced technologies, like cloud computing, and leveraging local warehouses for faster service. As businesses adopt QCommerce platforms such as Amazon Prime Now and DoorDash, they see significant sales and market dynamics changes.
The post How Quick Commerce is Transforming FMCG and eCommerce Sectors? first appeared on TestingXperts.

Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘RANA’, ip: ‘192.168.10.4’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘15.0.2’
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
at getResponseForW3CError (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolerrors.js:804:9)
at asyncHandler (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolprotocol.js:380:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘RANA’, ip: ‘192.168.10.4’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘15.0.2’
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:95)
at Calculator.main(Calculator.java:30)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 13 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘RANA’, ip: ‘192.168.10.4’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘15.0.2’
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.21.1.apk’. Original error: Could not find ‘apksigner.jar’ in [“C:\Users\Rana Hamza\Desktop\sdk-tools\platform-tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\emulator\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\cmdline-tools\latest\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\tools\bin\apksigner.jar”,”C:\Users\Rana Hamza\Desktop\sdk-tools\apksigner.jar”]. Do you have Android Build Tools installed at ‘C:UsersRana HamzaDesktopsdk-tools’?
at getResponseForW3CError (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolerrors.js:804:9)
at asyncHandler (C:UsersRana HamzaAppDataRoamingnpmnode_modulesappiumnode_modulesappium-base-driverlibprotocolprotocol.js:380:37)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
… 18 more

Recently I have implemented parallel selenium UI test execution by increasing Jenkins node count and creating multiple Jenkins jobs with different regression.xml files pointing to them.
In a nutshell in a single server, there are multiple browser windows open and start test execution.
Previously, we use just a one Jenkins node, so any given time there will only one browser instance running in the test server.
The problem I’m having is, we are having many failures with the Parallel execution when compared to old (sequential) execution.
I believe this happens because when multiple browsers are open in the same server, element focus might be change time to time.
And I got this type of exceptions most of the time.
org.openqa.selenium.ElementClickInterceptedException: element click intercepted:

So is this the normal behavior with multiple browser test in the same server, or is this something we can fix by having a code level improvements?

We have a webapp which is an ecommerce site, and we have another web app (data migration tool) whose main purpose is to bulk upload data to the ecommerce site.
We then have 3 environments we can deploy these web apps to. One is production, one is Staging, and last one is test environment.
My issue is that on Staging, we do regression test of the ecommerce site there but they also want the data migration tool be tested on the same environment.
I think this is wrong and told them it could lead to us not being sure if there is really a regression on the ecommerce site or the data migration tool is the problem. They argue that we just don’t do it simultaneously and it should be fine, which I still think may pose some problems or inefficiencies in the future.
I’m looking for arguments that can support my side so they’d agree that it’d be best to do the migration tool testing on a separate environment.
This migration tool btw is planned to be used around twice a month in case this is relevant.

from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import random
import select

driver = webdriver.Chrome(‘ChromeDriver’)
driver.get(“https://devbusiness.tunai.io/login”)
time.sleep(2)
driver.maximize_window()

#log in credentials
username = driver.find_element(By.NAME, “loginUsername”);
username.send_keys(“dayon@tunai”);

password = driver.find_element(By.NAME, “loginPassword”);
password.send_keys(“12341234″);

login = driver.find_element(By.XPATH,”//*[@id=’app’]/div/div/div/div/div/div[2]/form/div[4]/button”);
login.submit();
time.sleep(3)

driver.get(“https://devbusiness.tunai.io/dashboard/my_salon_user”)
time.sleep(3)

randomUsername = random.choice([“dayon.salon3@tunai”,”dayonmanager@tunai”,”Dayon.der@tunai”])
driver.find_element(By.XPATH, “//tbody[@role=’rowgroup’]/tr[@role=’row’]/td/a[text()='”+ randomUsername +”‘]”).click()
print(“Username selected: “, randomUsername)
time.sleep(5)

driver.find_element(By.XPATH,”//*[@id=’page-content’]/div/div[3]/div/div[2]/div/div/div[2]/div/div[1]/header/a”).click()
time.sleep(5)

# Get the list of elements
elements = driver.find_elements(By.CLASS_NAME,’custom-control-input’)

# Select a random element from the list
random_element = random.choice(elements)
driver.execute_script(“arguments[0].click();”, random_element)

# Click on the selected element
random_element.click()
print(“Element selected: “, random_element)
time.sleep(5)

driver.find_element(By.XPATH,”//*[@id=’accKey’]”).click()
time.sleep(5)

I’ve been add “argument.click[]”,”webdriver wait until EC to be clickable” but still showing “Element not intractable. What would be the other possible solution? Hope someone could clarify for me. Thanks and have a nice day.

Can we do manually performance testing for mobile application? There is any play/App store app available that only give the performance of specified of app. So that we can record the performance of that app only.
M2 monitor app that will give performance about specified and it is generating report also. What are the best apps to do performance testing in Android and Iphone?

Please help me learn how to identify problems in Appium mobile automation: I don’t know where to look to identify the error.
I built a test app with android-sdk on my physical mobile phone.
I took a little Appium test in java just to launch the test app on a connected physical Android device – a Huawei P30Pro.

this test is from a good tutorial with no errors in eclipse. It sure should be fine, the pom.xml too.
Appium server v1.22.3 is running in one instance
in Eclipse, I press the test Button Run as Java Application
the server window starts writing many lines like it’s working

Problem is:
1.) The Server writes many lines when working (is this the Server log (What/where is a stack trace?))
But suddenly comes the last line:
[HTTP] <– POST /wd/hub/session 500 4111 ms – 637
[HTTP]

1.b) at this moment the Eclipse console writes:
Server-side error occurred while processing Appium-server
Driver info: driver.version: AppiumDriver
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details.
Original error: An unknown server-side error occurred while processing the command. Original error: ‘app’ option is required for reinstall
… 12 more

2.) The Test-App is not launching at mobile device
But I have Android-Notification from Appium Settings ‘Keep this service running, so Appium for Android can work with system APIs’
My question is:
How can I find why <– POST /wd/hub/session has State=500
And why does this error come so late; why not at beginning
The server is running

The server is running
[Appium] Welcome to Appium v1.22.3
[Appium] Non-default server args:
[Appium] relaxedSecurityEnabled: true
[Appium] allowInsecure: {
[Appium] }
[Appium] denyInsecure: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] –> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“appActivity”:”com.example.yeshasprabhakar.todo.MainActivity”,”appPackage”:”com.example.yeshasprabhakar.todo1.0″,”platformName”:”Android”,”udid”:”22X0220428007340″,”platformVersion”:”10.0″},”capabilities”:{“firstMatch”:[{“appium:appActivity”:”com.example.yeshasprabhakar.todo.MainActivity”,”appium:appPackage”:”com.example.yeshasprabhakar.todo1.0″,”platformName”:”android”,”appium:platformVersion”:”10.0″,”appium:udid”:”22X0220428007340″}]}}
[W3C] Calling AppiumDriver.createSession() with args: [{“appActivity”:”com.example.yeshasprabhakar.todo.MainActivity”,”appPackage”:”com.example.yeshasprabhakar.todo1.0″,”platformName”:”Android”,”udid”:”22X0220428007340″,”platformVersion”:”10.0″},null,{“firstMatch”:[{“appium:appActivity”:”com.example.yeshasprabhakar.todo.MainActivity”,”appium:appPackage”:”com.example.yeshasprabhakar.todo1.0″,”platformName”:”android”,”appium:platformVersion”:”10.0″,”appium:udid”:”22X0220428007340″}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1665348795592 (22:53:15 GMT+0200 (Mitteleuropäische Sommerzeit))
[Appium]
[Appium] ======================================================================
[Appium] DEPRECATION WARNING:
[Appium]
[Appium] The ‘automationName’ capability was not provided in the desired
[Appium] capabilities for this Android session
[Appium]
[Appium] Setting ‘automationName=UiAutomator2’ by default and using the
[Appium] UiAutomator2 Driver
[Appium]
[Appium] The next major version of Appium (2.x) will **require** the
[Appium] ‘automationName’ capability to be set for all sessions on all
[Appium] platforms
[Appium]
[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] ‘automationName=UiAutomator1’
[Appium]
[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add ‘automationName=UiAutomator1’ to your desired capabilities
[Appium]
[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] ‘Drivers’ menu
[Appium]
[Appium] ======================================================================
[Appium]
[Appium] Appium v1.22.3 creating new AndroidUiautomator2Driver (v1.70.1) session
[Appium] Applying relaxed security to ‘AndroidUiautomator2Driver’ as per server command line argument. All insecure features will be enabled unless explicitly disabled by –deny-insecure
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] “alwaysMatch”: {
[BaseDriver] “platformName”: “android”,
[BaseDriver] “appium:appActivity”: “com.example.yeshasprabhakar.todo.MainActivity”,
[BaseDriver] “appium:appPackage”: “com.example.yeshasprabhakar.todo1.0”,
[BaseDriver] “appium:platformVersion”: “10.0”,
[BaseDriver] “appium:udid”: “22X0220428007340”
[BaseDriver] },
[BaseDriver] “firstMatch”: [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] Session created with session id: cf0a35b0-da66-4fa9-a6c7-b4aca880f564
[UiAutomator2] Starting ‘com.example.yeshasprabhakar.todo1.0’ directly on the device
[ADB] Found 3 ‘build-tools’ folders under ‘C:UserscauseAppDataLocalAndroidSdk’ (newest first):
[ADB] C:/Users/cause/AppData/Local/Android/Sdk/build-tools/33.0.0
[ADB] C:/Users/cause/AppData/Local/Android/Sdk/build-tools/30.0.3
[ADB] C:/Users/cause/AppData/Local/Android/Sdk/build-tools/29.0.3
[ADB] Using ‘adb.exe’ from ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe’
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 start-server’
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices
[ADB] Connected devices: [{“udid”:”22X0220428007340″,”state”:”device”}]
[AndroidDriver] Using device: 22X0220428007340
[ADB] Using ‘adb.exe’ from ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe’
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 start-server’
[ADB] Setting device id to 22X0220428007340
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell getprop ro.build.version.sdk’
[ADB] Current device property ‘ro.build.version.sdk’: 29
[ADB] Getting device platform version
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell getprop ro.build.version.release’
[ADB] Current device property ‘ro.build.version.release’: 10
[ADB] Device API level: 29
[UiAutomator2] Relaxing hidden api policy
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell ‘settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1”
[AndroidDriver] No app sent in, not parsing package/activity
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 wait-for-device’
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell echo ping’
[AndroidDriver] Pushing settings apk to device…
[ADB] Getting install status for io.appium.settings
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys package io.appium.settings’
[ADB] ‘io.appium.settings’ is installed
[ADB] Getting package info for ‘io.appium.settings’
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys package io.appium.settings’
[ADB] The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘3.4.0’ >= ‘3.4.0’)
[ADB] There is no need to install/upgrade ‘C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesio.appium.settingsapkssettings_apk-debug.apk’
[ADB] Getting IDs of all ‘io.appium.settings’ processes
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell ‘pgrep –help; echo $?”
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)’
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell appops set io.appium.settings android:mock_location allow’
[Logcat] Starting logs capture with command: C:\Users\cause\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 22X0220428007340 logcat -v threadtime
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 forward tcp:8200 tcp:6790’
[UiAutomator2] Server package at ‘C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.27.0.apk’ is not writeable. Will copy it into the temporary location at ‘C:UserscauseAppDataLocalTemp202299-19828-1p2wn9i.yjgq’ as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[UiAutomator2] Server package at ‘C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-debug-androidTest.apk’ is not writeable. Will copy it into the temporary location at ‘C:UserscauseAppDataLocalTemp202299-19828-1p2wn9i.yjgq’ as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys package io.appium.uiautomator2.server’
[ADB] ‘io.appium.uiautomator2.server’ is installed
[ADB] Getting package info for ‘io.appium.uiautomator2.server’
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys package io.appium.uiautomator2.server’
[ADB] The version name of the installed ‘io.appium.uiautomator2.server’ is greater or equal to the application version name (‘4.27.0’ >= ‘4.27.0’)
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[ADB] Checking app cert for C:UserscauseAppDataLocalTemp202299-19828-1p2wn9i.yjgqappium-uiautomator2-server-v4.27.0.apk
[ADB] Using ‘apksigner.jar’ from ‘C:UserscauseAppDataLocalAndroidSdkbuild-tools33.0.0libapksigner.jar’
[ADB] Starting apksigner: ‘C:\Program Files\Java\jdk-19\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Users\cause\AppData\Local\Android\Sdk\build-tools\33.0.0\lib\apksigner.jar verify –print-certs C:\Users\cause\AppData\Local\Temp\202299-19828-1p2wn9i.yjgq\appium-uiautomator2-server-v4.27.0.apk
[ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB]
[ADB] sha256 hash did match for ‘appium-uiautomator2-server-v4.27.0.apk’
[ADB] ‘C:UserscauseAppDataLocalTemp202299-19828-1p2wn9i.yjgqappium-uiautomator2-server-v4.27.0.apk’ is signed with the default certificate
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys package io.appium.uiautomator2.server.test’
[ADB] ‘io.appium.uiautomator2.server.test’ is installed
[ADB] Checking app cert for C:UserscauseAppDataLocalTemp202299-19828-1p2wn9i.yjgqappium-uiautomator2-server-debug-androidTest.apk
[ADB] Starting apksigner: ‘C:\Program Files\Java\jdk-19\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Users\cause\AppData\Local\Android\Sdk\build-tools\33.0.0\lib\apksigner.jar verify –print-certs C:\Users\cause\AppData\Local\Temp\202299-19828-1p2wn9i.yjgq\appium-uiautomator2-server-debug-androidTest.apk
[ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB]
[ADB] sha256 hash did match for ‘appium-uiautomator2-server-debug-androidTest.apk’
[ADB] ‘C:UserscauseAppDataLocalTemp202299-19828-1p2wn9i.yjgqappium-uiautomator2-server-debug-androidTest.apk’ is signed with the default certificate
[UiAutomator2] Server packages are not going to be (re)installed
[UiAutomator2] Waiting up to 30000ms for services to be available
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell pm list instrumentation’
[UiAutomator2] Instrumentation target ‘io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner’ is available
[ADB] Adding packages [“io.appium.settings”,”io.appium.uiautomator2.server”,”io.appium.uiautomator2.server.test”] to Doze whitelist
[ADB] Got the following command chunks to execute: [[“dumpsys”,”deviceidle”,”whitelist”,”+io.appium.settings”,”;”,”dumpsys”,”deviceidle”,”whitelist”,”+io.appium.uiautomator2.server”,”;”,”dumpsys”,”deviceidle”,”whitelist”,”+io.appium.uiautomator2.server.test”,”;”]]
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;’
[UiAutomator2] No app capability. Assuming it is already on the device
[ADB] Getting install status for com.example.yeshasprabhakar.todo1.0
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell dumpsys package com.example.yeshasprabhakar.todo1.0’
[ADB] ‘com.example.yeshasprabhakar.todo1.0’ is not installed
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell am force-stop com.example.yeshasprabhakar.todo1.0’
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 forward –remove tcp:8200’
[UiAutomator2] Restoring hidden api policy to the device default configuration
[ADB] Running ‘C:UserscauseAppDataLocalAndroidSdkplatform-toolsadb.exe -P 5037 -s 22X0220428007340 shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy”
[BaseDriver] Event ‘newSessionStarted’ logged at 1665348801035 (22:53:21 GMT+0200 (Mitteleuropäische Sommerzeit))
[W3C] Encountered internal error running command: Error: ‘app’ option is required for reinstall
[W3C] at Object.resetApp (C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesappium-android-driverlibandroid-helpers.js:405:11)
[W3C] at AndroidUiautomator2Driver.initAUT (C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesappium-uiautomator2-driverlibdriver.js:546:9)
[W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesappium-uiautomator2-driverlibdriver.js:408:5)
[W3C] at AndroidUiautomator2Driver.createSession (C:Program FilesAppium Server GUIresourcesappnode_modulesappiumnode_modulesappium-uiautomator2-driverlibdriver.js:229:7)
[W3C] at AppiumDriver.createSession (C:Program FilesAppium Server GUIresourcesappnode_modulesappiumlibappium.js:387:35)
[HTTP] <– POST /wd/hub/session 500 5562 ms – 663
[HTTP]

AI driven DevOps is transforming software development by integrating AI to enhance efficiency, security, and quality. Nearly half of the code on GitHub is AI-generated, and 92% of developers use AI tools. By 2028, 75% of enterprises will use AI code assistants, accelerating software delivery and reducing costs. The blog discusses how AI in DevOps improves processes with predictive analytics, automated testing, and enhanced security. It offers significant business benefits like better software quality, increased productivity, faster time-to-market, and optimized workflows.
The post How does AI-driven DevOps Transform Software Development? first appeared on TestingXperts.

I can catch the headers that are visible, not the ones that are not visible. If I use execute_script(“document.body.style.zoom=’30%'”) with chrome, I can capture up to 40 (out of 50) hearders, is there no better way to do this? Sure, you can try to scroll using scrollIntoView, but that doesn’t work well.
it looks like this:

You see in the picture 15 headers but they are 50.

I have a webpage to be tested which has a button at the footer of the page. When i click it, there should be an error message shown near to it.

I was successful in automating this scenario but the issues that , page view does not scroll automatically to page footer. So, on test failures the screenshot i get does not have footer region of the page and thus cannot tell why the test failed.

I have tackled this issue by scrollingto the button element using javascript:

await browser.executeScript(‘arguments[0].scrollIntoView()’, element);

But moving to each element in my test suite through a custom script does not look advisable.

Is there a better way to automatically scroll to the element with which the webdriver api is interacting?

For instance , if i click the button then the browser scrolls automatically to page footer and if i again click the title of page, then the browser scrolls back to top?

I’m using Appium 1.20. I’m trying to find a way to scroll to an element.
public static void scrollToElement(WebElement e) {
JavascriptExecutor js = driver;
HashMap scrollObject = new HashMap();
scrollObject.put(“direction”, “down”);
scrollObject.put(“name”, e.getId()); // <– there is no getId for WebElement.
js.executeScript(“mobile: scroll”, scrollObject);
}

Unfortunately, there is no getId() for WebElement.
How do you scroll to an element in Appium 2?