GithubHelp home page GithubHelp logo

winium's Introduction

English description | Описание на русском

Winium

Winium is Selenium Remote WebDriver implementations for automated testing on Windows platforms

Automation framework for Windows platforms. It is free. It is opensource. It is Selenium-based.

Why Winium?

You have Selenium WebDriver for testing of web apps, Appium for testing of iOS and Android apps. And now you have Selenium-based tools for testing of Windows apps too. What are some of the benefits? As said by Appium:

  • You can write tests with your favorite dev tools using any WebDriver-compatible language such as Java, Objective-C, JavaScript with Node.js (in promise, callback or generator flavors), PHP, Python, Ruby, C#, Clojure, or Perl with the Selenium WebDriver API and language-specific client libraries.
  • You can use any testing framework.

Supported Platforms

  • Windows Desktop (WPF, WinForms) Apps
  • Windows Store or Universal Apps for Windows Phone
  • Windows Phone Silverlight Apps

GitHub release ![GitHub license](https://img.shields.io/badge/license-MPL 2.0-blue.svg?style=flat-square)

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.

Supported Platforms

  • WinForms
  • WPF

Winium.StoreApps.InnerServer Inner Server NuGet version Winium.Silverlight.InnerServer NuGet version GitHub release ![GitHub license](https://img.shields.io/badge/license-MPL 2.0-blue.svg?style=flat-square)

Winium.Mobile is Selenium Remote WebDriver implementation for automated testing of Windows StoreApps and Silverlight apps, tested on emulators (currently only Windows Phone/Mobile apps are supported)

Supported Platforms

  • Windows Phone 8.1 Store Apps (or Universal App for Windows Phone)
  • Windows Phone 8.1 Silverlight apps
  • Windows 10 Mobile (there are some known issues)

Prototype of Winium Mobile driver using CodedUI. It is Selenium Remote WebDriver implementation for automation of Windows Phone 8.1 and Windows 10 Mobile applications.

winium's People

Contributors

lionrouge avatar nickab avatar skyline-gleb avatar tkurnosova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winium's Issues

Selenium-WebDriver

Hi guys..
Can i know that it is possible to write load testing script in selenium webdriver using cucumber with Eclipse

winium.elements.desktop.ComboBox - ScrollTo doesn't work

I am trying to use the winium.elements.desktop.ComboBox lib;
Expand / collapse works fine however when i open the combo & want to scroll to an element that is not visible the .scrollTo fails.
Any idea what am I missing?

I expected that the .scrollTo will scroll the combo list till it founds the relevant element.

public void clickComboElement(StudioMethods genMeth, By by, By byClickElement) throws InterruptedException{

    //This method will open a combo, scroll to the specific element & click it
    ComboBox combo;
    WebElement el = genMeth.returnBy(genMeth, by);
    combo = WebElementExtensions.toComboBox(el);
    combo.expand();
    combo.scrollTo(byClickElement);

}

Winium Desktop Xpath Issue

While locating an element like Textbox by using Xpath i'm getting several errors everytime. I just want to locate a textbox with xpath because there are already two textbox with same classname and no automation id, But while I'm trying to access that particular element with Xpath getting error like"Native" and other kinds of error. I have used- //[@classname='textbox'] and also /[@classname='textbox'] and
//*[contains(@classname,'textbox')], None of them worked for me.

Please Reply @ my email address asap coz I need this for my Project Deliverables.

Winium crash on windows 10 and Java

I am trying to run simple example with calc.exe using Java 8

I've added dependency and did everything as in example, but getting error

Starting Windows Desktop Driver on port 9999

18:21:14 [DEBUG] Waiting for a connection...

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'nb-sepi', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
Driver info: driver.version: WiniumDriver

	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:641)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
	at org.openqa.selenium.winium.WiniumDriver.<init>(WiniumDriver.java:75)
	at com.example.CalculatorTest.calc_test(CalculatorTest.java:27)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:253)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.IllegalStateException: The process has not exited yet therefore no result is available ...
	at org.apache.commons.exec.DefaultExecuteResultHandler.getException(DefaultExecuteResultHandler.java:76)
	at org.openqa.selenium.os.UnixProcess.checkForError(UnixProcess.java:171)
	at org.openqa.selenium.os.CommandLine.checkForError(CommandLine.java:185)
	at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
	at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:166)
	at org.openqa.selenium.winium.WiniumDriverCommandExecutor.execute(WiniumDriverCommandExecutor.java:72)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:620)

BUILD FAILURE while updating maven dependency

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MFiles - Web Automation Tests 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.543s
[INFO] Finished at: Sun Jul 03 23:40:57 EEST 2016
[INFO] Final Memory: 8M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.3.1 from/to all (http://repo.maven.apache.org/maven2): java.net.ConnectException: null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom: UnresolvedAddressException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

further development?

Hi there!

First, thank you for this great and very useful framework. We are actively investigating its usefulness for our project and so far it's looking promising.

Just wondering if there is any further effort to enhancing Winium in any way, especially for its Java binding.

Thank you for your time!

Mike

SendKeys deletes existing content

Using this in JavaScript

Seems that every time I use sendKeys to an element, I can't stop it from deleting the previous content. Sometimes I want to augment the existing textbox, but no matter what I try it will remove the previous text.

I've even tried sending a right arrow key to stop the existing text selection.

Illegal chars in execution line

I am trying to launch the following application which has command line params.
Can this be done
I am using python.
For example
applocation = '"C:\Program Files\Compuware\Uniface 9.2.01\bin\uniface.exe" /ini=\inis\PMMQA2.AJB.INI'
Then When I try to do the following:
self.driver = Remote(command_executor="http://localhost:9999",
desired_capabilities=self.desired_capabilities)
I get the following error message:
u'Illegal characters in path.'

What could be the reason for this?

Winium on selenium grid

Is is possible to add a Winium server to a selenium grid, and if so, is there any documentation on this process?

Unable to clear the data in text fields using clear(), sendKeys("") methods

clear();
sendKeys("");

method is not actually clearing the data in the text field, it was working fine earlier but all of sudden it started failing. It is clearing only one character, not the entire text now. I restarted winium driver and also relaunched eclipse work-space with admin privileges. Can any one let me know what could be the issue.

I am using winium desktop driver 1.6.0.0
winium-elements-desktop - 0.1.0.-1.jar
winium-webdriver- 0.1.0-1.jar

Thanks,
VaraPrasad

Click strategies

Can you help me? Is it possible to use ClickStrategies in Winium for Desktop like Cruciatus does Click(MouseButton.Left, ClickStrategies.BoundingRectangleCenter, true)?

How to disable mouse movements

Hi,
how to disable mouse movements. if mouse is moving i cant able to do any another work so how to disable the mouse movements

Parameters for application execution

Hi there! I have a question about application execution with parameters. In your example with calculator we see C# code:
DesiredCapabilities dc = new DesiredCapabilities();
dc.SetCapability("app", @"C:/windows/system32/calc.exe");
Tell me please how can I launch application with parameters for example:
dc.SetCapability("app", @"C:/windows/system32/notepad.exe c:/text.txt");
In my case it is :
dc.SetCapability("app", @"C:/windows/system32/msiexec.exe /i c:\installer.msi");

When I try to do this I get exception
{"Path "C:/windows/system32/notepad.exe c:/ObserveITWebServices_SetupAction.txt" doesn't exists"}

Thanks in advance!

How to getText() from an element using Java?

When I call getText() upon an element I'm getting the following message:

NO GET TEXT (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 16 milliseconds Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700' System info: host: 'd-1816', ip: '10.10.25.26', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0' Driver info: org.openqa.selenium.winium.WiniumDriver Capabilities [{app=C:\Windows\system32\calc.exe, args=, innerPort=9998, debugConnectToRunningApp=false, keyboardSimulator=1, launchDelay=0, platform=ANY}] Session ID: AwesomeSession

Is there an alternate form of getting an element's text with Winium?

How to press f5

How do I press F5 key?
In our Windows desktop app I need to press the F5 in order to refresh the app's left side menu so I tried the below code but it didn't work.
Any suggestions?

Actions action = new Actions(driver);
action.sendKeys(Keys.F5).perform();

Any plans to implement getLocation

I am getting the following error when trying to get a location of an element.
signonWin.location
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 364, in location
old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 454, in _execute
return self._parent.execute(command, params)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 181, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: 'getElementLocation' is not valid or implemented command.

Winium vs White comparison

Hi guys, I can't find your contact, so decided to write here. Sorry about that.

Can you please provide the difference between White Framework https://github.com/TestStack/White and the winium?

Need your expertise, have you considered/tried this framework in your company?

Sorry again.

Is that .net 4.0 be supported possible?

Hi Devs,

As the old system like Visual Studio 2010 and .Net framework 4.0 still be used, the force of .Net 4.5+ maybe stop many user from using Winium.

Why .net 4.0 is important? As Microsoft's WPF+Automation tech stack has no substantial upgrade after .Net 4.0, am I right? many old user may keep using .Net 4.0

By another way, the later Visual Studio 2010 and .Net Framework's upgrade upgrade upgrade style is really not so friendly to some old classic company, which will focus on business and does not have the human resource to upgrade and test the framework!

As some other libray provider will push .Net 4.0, .Net 4.0+ to nugut, will Winium follow the style and adjust with Winium.Cruciatus?

Tks,
Cong

Press Ctrl + Shift + Arrow_down

Hi!, I'm trying to make a selection in an excel file with Winium and Java, and the first problem is Winium doesn't recognize the elements that don't appear in the screen, so I need to move the scrollbar. The second problem is when I try to press the keys combination Ctrl + Shift + Arrow_down to get the selection to the last fill cell:

Actions actions = new Actions(driver);
actions.keyDown(Keys.CONTROL).keyDown(Keys.SHIFT).keyDown(Keys.ARROW_DOWN).keyUp(Keys.ARROW_DOWN).keyUp(Keys.SHIFT).keyUp(Keys.CONTROL).build().perform();

but keyDown(Keys.ARROW_DOWN) doesn't work, it throws:
java.lang.IllegalArgumentException: Key Down / Up events only make sense for modifier keys.

I've searched in the net but I haven't find a solution, maybe there is another way to do this.
Any help is welcome.

Thank you.
Regards.

How can I wait for element to load

I am trying to wait for an element to load but am getting an exception:

wait = WebDriverWait(self.driver, 20)

I am getting an exception

Desktop app automation

Hi,

We have the hybrid framework implemented using the selenium, core java to support web automation, we now are planning to support the desktop automation also with our framework.
the questions is winium is suitable for me? to integrate with my framework?
if i struck in mid or with any issue, how the support i am going get it from the community?
is there any another tools like autoIT can i go with??
Any help would be really appreciate.

thanks
srini
[email protected]

Unable to locate elements

I am a newbie to winnium. I am trying to automate calculator application using java and winnium. Element is not getting identified when using id. How to use automator id and identify element in java?

Unable to Extract listview Text from the Application

list

Unable to Extract listview Text from the Application and unable to window in UI Spy but able to get window inspect.

Requirement extract names which contains "High Priority" in VB.net Loop till its Blank.
Tried the Below code not working

window = driver.FindElementByClassName("SWT_Window0")
Dim els As IList(Of IWebElement) = window.FindElements(By.Name("High"))
' Dim els As IList(Of IWebElement) = window.FindElements(By.XPath("//*[contains(@name, 'High Priority')]"))
Debug.Print(els(0).GetAttribute("name"))
Debug.Print(els(0).GetAttribute("AutomationId"))
Debug.Print(els(0).GetAttribute("ControlType"))

==================Inspect element Code==================
How found: Focus
Name: "High Priority DP Service Desk DP Shared Hub Notification - Application Upgrade November 1st 2015 09/17/2015 01:02 PM 62K"
ControlType: UIA_ListItemControlTypeId (0xC357)
LocalizedControlType: "list item"
BoundingRectangle: {l:928 t:192 r:1328 b:236}
IsEnabled: true
IsOffscreen: false
IsKeyboardFocusable: true
HasKeyboardFocus: true
AccessKey: ""
ProcessId: 3316
RuntimeId: [2A.20708.2.80000001.20708.FFFFFFFC.2]
ProviderDescription: "[pid:3316,hwnd:0x0 Annotation:Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]"
IsPeripheral: [Not supported]
LiveSettingProperty: [Not supported]
IsPassword: false
HelpText: ""
FlowsFrom: [Not supported]
OptimizeForVisualContent: [Not supported]
PositionInSet: [Not supported]
SizeOfSet: [Not supported]
Level: [Not supported]
AnnotationTypes: [Not supported]
AnnotationObjects: [Not supported]
Annotation.AnnotationAuthor: [Not supported]
Annotation.AnnotationTypeId: [Not supported]
Annotation.Author: [Not supported]
Annotation.DateTime: [Not supported]
Annotation.Target: [Not supported]
Drag.DropEffect: [Not supported]
Drag.DropEffects: [Not supported]
Drag.GrabbedItems: [Not supported]
Drag.IsGrabbed: [Not supported]
DropTarget.DropTargetEffect: [Not supported]
DropTarget.DropTargetEffects: [Not supported]
LegacyIAccessible.ChildId: 2
LegacyIAccessible.DefaultAction: "Press"
LegacyIAccessible.Description: ""
LegacyIAccessible.Help: ""
LegacyIAccessible.KeyboardShortcut: ""
LegacyIAccessible.Name: "High Priority DP Service Desk DP Shared Hub Notification - Application Upgrade November 1st 2015 09/17/2015 01:02 PM 62K"
LegacyIAccessible.Role: list item (0x22)
LegacyIAccessible.State: selected,focused,focusable,selectable,multiple selectable (0x1300006)
LegacyIAccessible.Value: "1 Unread"
ObjectModel.UnderlyingObjectModel: [Error: calling getter for this property: hr=0x80070057 - The parameter is incorrect.]
SelectionItem.IsSelected: true
SelectionItem.SelectionContainer: "Inbox" list
SpreadsheetItem.AnnotationObjects: [Not supported]
SpreadsheetItem.AnnotationTypes: [Not supported]
SpreadsheetItem.Formula: [Not supported]
Style.ExtendedProperties: [Not supported]
Style.FillColor: [Not supported]
Style.FillPatternColor: [Not supported]
Style.FillPatternStyle: [Not supported]
Style.Shape: [Not supported]
Style.StyleId: [Not supported]
Style.StyleName: [Not supported]
Value.IsReadOnly: false
Value.Value: "1 Unread"
Transform2.CanZoom: [Not supported]
Transform2.ZoomLevel: [Not supported]
Transform2.ZoomMinimum: [Not supported]
Transform2.ZoomMaximum: [Not supported]
IsAnnotationPatternAvailable: [Not supported]
IsDragPatternAvailable: [Not supported]
IsDockPatternAvailable: false
IsDropTargetPatternAvailable: [Not supported]
IsExpandCollapsePatternAvailable: false
IsGridItemPatternAvailable: false
IsGridPatternAvailable: false
IsInvokePatternAvailable: true
IsItemContainerPatternAvailable: false
IsLegacyIAccessiblePatternAvailable: true
IsMultipleViewPatternAvailable: false
IsObjectModelPatternAvailable: [Not supported]
IsRangeValuePatternAvailable: false
IsScrollItemPatternAvailable: false
IsScrollPatternAvailable: false
IsSelectionItemPatternAvailable: true
IsSelectionPatternAvailable: false
IsSpreadsheetItemPatternAvailable: [Not supported]
IsSpreadsheetPatternAvailable: [Not supported]
IsStylesPatternAvailable: [Not supported]
IsSynchronizedInputPatternAvailable: false
IsTableItemPatternAvailable: false
IsTablePatternAvailable: false
IsTextChildPatternAvailable: [Not supported]
IsTextEditPatternAvailable: [Not supported]
IsTextPatternAvailable: false
IsTextPattern2Available: [Not supported]
IsTogglePatternAvailable: false
IsTransformPatternAvailable: false
IsTransform2PatternAvailable: [Not supported]
IsValuePatternAvailable: true
IsVirtualizedItemPatternAvailable: false
IsWindowPatternAvailable: false
IsCustomNavigationPatternAvailable: [Not supported]
FirstChild: [null]
LastChild: [null]
Next: "High Priority Aola Collapsed Twistie Icon Dump (2 thread documents) 09/16/2015 06:03 PM 2K" list item
Previous: "Expanded Twistie Icon High Importance" list item
Other Props: Object has no additional properties
Children: Container has no children
Ancestors: "Inbox" list
"" pane
"" pane
"" pane
"" pane
"" pane
"" pane
"" pane
"" pane
"" pane
"" pane
"" pane
"Mail - Inbox - Notes" window
"Desktop" pane
[ No Parent ]

org.openqa.selenium.remote.UnreachableBrowserException

Hi,

I am getting the below exception:

FAILED CONFIGURATION: @BeforeClass setUpEnvironment
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'MUSADE206053', ip: '10.250.58.162', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: WiniumDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:641)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:129)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at org.openqa.selenium.winium.WiniumDriver.(WiniumDriver.java:84)
at testWinium.testWin.TripTest.setUpEnvironment(TripTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:254)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
Caused by: org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:9999 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'MUSADE206053', ip: '10.250.58.162', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: WiniumDriver
at org.openqa.selenium.winium.WiniumDriverCommandExecutor.execute(WiniumDriverCommandExecutor.java:86)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:620)
... 29 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:9999 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:143)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:89)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.winium.WiniumDriverCommandExecutor.execute(WiniumDriverCommandExecutor.java:78)
... 30 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:337)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
... 43 more

SKIPPED: testTrips

My code:

package testWinium.testWin;

import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.winium.DesktopOptions;
import org.openqa.selenium.winium.WiniumDriver;
import org.openqa.selenium.winium.WiniumOptions;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class TripTest {

WiniumDriver driver = null;

@BeforeClass
public void setUpEnvironment(){
	DesktopOptions options = new DesktopOptions();
	options.setApplicationPath("C:\\windss\\Common\\Exe\\ComBw4955.exe");
	
	try {
		driver = new WiniumDriver(new URL("https://localhost:9999"),options);
	} catch (MalformedURLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}


@Test
public void testTrips(){
	driver.findElementById("cmdServerOptions").click();
	driver.findElementById("txtUser").sendKeys("TRIPSDEV");
	
	
	
}

}

Could you please let me know what is the issue here.

Enter Text in Text input

Team,

How to you enter text into a field with no name?

I have a popup that looks like Name : textbox

I believe these are two distinct elements on the page. I can say click "Name :" and that works.... but I have no idea of how to find the textbox element. works great for buttons, they all have names.

What about buttons on a page with the same name?

thank you for the help

Winium.Desktop - Starting application in a certian location

I am trying to have the application launch for a particular location.
Can we do that using Desired Capabilities?
for example I have the application installed on C: drive but I want it to launch from a mapped K drive?
Is there anyway to do that?

startwiniumatcertainlocation

How to start Winium Driver with java code

Hi,

As Chrome driver can be started as System. setProperty("webdriver.chrome.driver", "path of the exe file\chromedriver.exe"); is there a similar way in which we can start the winium driver.

How to change the hierarchy of Winium driver while working on deskptop application

Hi,

I want to know how can i change the hierarchy of the Winium driver,
Suppose I have a screen with window w1 - pane p1 - login screens. after entering credential, the application loads and window changed to W2. Now my driver should point to Widow w2- pane P2 - Home Page. Looking forward for the resolution.

Thanks,
Sourabh

how to avoid mouse moving

whem iam doing calc automation mouse also moving. this there any way to run the automation without moving the mouse

Handling popups

Team,

How do you switch to a popup and do some work, close the window and return to the app?
private WiniumDriver app = null;

String winHandleBefore = app.getWindowHandle();
trkPlus.getReasonCode().clickMenuItem("Activate");
wait(5000);
for (String winHandle : app.getWindowHandles()) {
// Switch to child window
app.switchTo().window(winHandle);
}
trkPlus.clickMenuItem("OK");
app.switchTo().window(winHandleBefore);

WebBrowser in WPF

Hi team,

I have a WPF application that wraps a Internet explorer instance. When dealing with the WPF portions my team is able to navigate via ID. However when we get in to the pane that contains IE elements we are no longer able to use IDs to locate elements.

When Using Visual UIA Verify 20 we are able to see the IE elements with IDs.

Xpaths are very slow with winium

Hi Team ,

I have tried to automate calculator app with winium and noticed that xpaths are very slow with winium . The same code with name takes less that 10 sec to identify the element and with xpath it takes around 2 minutes. Please provide a solution with which I can reduce execution time with xpath . Please find the blow code for reference

import java.awt.Desktop;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.winium.DesktopOptions;
import org.openqa.selenium.winium.WiniumDriver;

public class WiniumBasic {

   public static void main(String args[]) throws MalformedURLException, InterruptedException
   {
          WiniumDriver driver = null;
          DesktopOptions op = new DesktopOptions();
          op.setApplicationPath("C:\\Windows\\System32\\calc.exe");
          
          driver = new WiniumDriver(new URL("http://localhost:9999"),op);
          //driver.findElementByClassName("Edit").sendKeys("Hemant is Winium Expert");
          //driver.findElementByXPath("//*[@AutomationId='135']").click();
          Thread.sleep(10000);
          String date = new SimpleDateFormat("MM_dd_HH_mm_ss").format(new Date());
          System.out.println(date);
          System.out.println("Andar Chali Gayi");
          WebElement calcframe = driver.findElementByClassName("CalcFrame");
          WebElement menu = calcframe.findElement(By.id("MenuBar"));
          WebElement viewmenu = menu.findElement(By.name("View"));
          
          calcframe.findElement(By.xpath("//Button[@Name='7']")).click();  
          calcframe.findElement(By.name("6")).click();
      
          
   }

}

Unknown command recived: http://localhost:9999/wd/hub/session

In grid console

2016-05-05 08:11:33,024 [9602862-13] INFO  RouteServlet         - [SESSION_ATTEMPTED] [usertest] [10.6.33.88] [firefox] [http://10.6.33.88:4444] [1]
2016-05-05 08:11:37,980 [9602862-13] INFO  RouteServlet         - [SESSION_CREATED] [usertest] [10.6.33.88] [firefox] [http://10.6.33.88:4444] [0ec52d59-fc3b-492c-9c82-e2031d40d3c1] [1]
2016-05-05 08:11:41,718 [9602862-16] INFO  RouteServlet         - [SESSION_ATTEMPTED] [usertest] [10.6.33.88] [winium] [http://10.6.2.72:9999] [1]
2016-05-05 08:11:41,726 [9602862-16] ERROR RouteServlet         - [BAD_HUB_JSON] [] [usertest] [10.6.33.88] - winium
2016-05-05 08:11:41,726 [9602862-16] ERROR RouteServlet         - [SESSION_NOT_CREATED] [usertest] [10.6.33.88] [winium]
2016-05-05 08:11:45,561 [9602862-11] INFO  RouteServlet         - [SESSION_ATTEMPTED] [usertest] [10.6.33.88] [winium] [http://10.6.2.72:9999] [1]
2016-05-05 08:11:45,566 [9602862-11] ERROR RouteServlet         - [BAD_HUB_JSON] [] [usertest] [10.6.33.88] - winium
2016-05-05 08:11:45,566 [9602862-11] ERROR RouteServlet         - [SESSION_NOT_CREATED] [usertest] [10.6.33.88] [winium]
2016-05-05 08:11:48,239 [9602862-17] INFO  RouteServlet         - [SESSION_ATTEMPTED] [usertest] [10.6.33.88] [winium] [http://10.6.2.72:9999] [1]
2016-05-05 08:11:48,248 [9602862-17] ERROR RouteServlet         - [BAD_HUB_JSON] [] [usertest] [10.6.33.88] - winium
2016-05-05 08:11:48,248 [9602862-17] ERROR RouteServlet         - [SESSION_NOT_CREATED] [usertest] [10.6.33.88] [winium]
2016-05-05 08:11:51,145 [9602862-10] INFO  RouteServlet         - [SESSION_ATTEMPTED] [usertest] [10.6.33.88] [winium] [http://10.6.2.72:9999] [1]
2016-05-05 08:11:51,150 [9602862-10] ERROR RouteServlet         - [BAD_HUB_JSON] [] [usertest] [10.6.33.88] - winium
2016-05-05 08:11:51,151 [9602862-10] ERROR RouteServlet         - [SESSION_NOT_CREATED] [usertest] [10.6.33.88] [winium]
2016-05-05 08:11:51,790 [9602862-16] INFO  RouteServlet         - [SESSION_ATTEMPTED] [usertest] [10.6.33.88] [winium] [http://10.6.2.72:9999] [1]
2016-05-05 08:11:51,795 [9602862-16] ERROR RouteServlet         - [BAD_HUB_JSON] [] [usertest] [10.6.33.88] - winium
2016-05-05 08:11:51,795 [9602862-16] ERROR RouteServlet         - [SESSION_NOT_CREATED] [usertest] [10.6.33.88] [winium]
2016-05-05 08:11:51,863 [9602862-13] INFO  ProxyServlet         - [SESSION_DELETED] [10.6.33.88] [http://10.6.33.88:4444] [0ec52d59-fc3b-492c-9c82-e2031d40d3c1]

In Winium console

Starting Windows Desktop Driver on port 9999

09:25:59 [DEBUG] Waiting for a connection...
09:27:06 [DEBUG] ACCEPTED REQUEST POST /wd/hub/session HTTP/1.1
09:27:06 [WARN] Unknown command recived: http://localhost:9999/wd/hub/session
09:27:06 [DEBUG] Client closed

Init driver for WINIUM:

DesiredCapabilities cap = new DesiredCapabilities();
        cap.setCapability("app", "C:\***-test\***\****.exe");
        cap.setCapability("launchDelay", 30000);
        cap.setBrowserName("winium");

driver = new RemoteWebDriver(new URL("http://usertest:[email protected]:4444/wd/hub"), cap);

Init driver for Firefox:

DesiredCapabilities cap = new DesiredCapabilities();
        cap.setBrowserName("firefox");

driver = new RemoteWebDriver(new URL("http://usertest:[email protected]:4444/wd/hub"), cap);

Running test in Windows docker or inside locked system

Is there any solution currently available for running test inside the windows docker with Winiumdriver? Or if test can be ran when the system is locked?
I have a Windows app that we run the tests in windows 10 machine and if the tests are run from Jenkins, I need to turn off the screensaver. Also we need to keep the system unlocked for the test that are scheduled overnight for unmanned. For security reason, it's not safe to keep the system unlocked and also its a big process to get this security turn off locks in certain companies. So how we run the test with system locked in more secured way? Can we achieve something similar to selenium docker(refer hub.docker.com) for running Windows app inside the docker / headless mode? This would let us effectively use the not utilized CPU capacity for parallel windows app testing and completing the tests much faster.

how to get a property (LegacyIAccessible.Value) of an element?

how to get a property (**LegacyIAccessible.**Value) of an element?

LegacyIAccessible.ChildId: 0 LegacyIAccessible.DefaultAction: "" LegacyIAccessible.Description: "" LegacyIAccessible.Help: "DataGridViewTextBoxCell(DataGridViewCell)" LegacyIAccessible.KeyboardShortcut: "" LegacyIAccessible.Name: "qwert Row 0" LegacyIAccessible.Role: cell (0x1D) LegacyIAccessible.State: selected,focused,focusable,selectable (0x300006) LegacyIAccessible.Value: "34617082"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.