Open diptilenka opened 1 year ago
diptilenka Per your screen it should be something like
await (await (await $('//*[@automationId=\"AboutTb\"]')).shadow$('//*[@Name=\"About\"]')).waitForDisplayed();
Now it shows this error @Shakevg
@diptilenka Sorry, github removed char after "//". I fixed code above, try one more time
@diptilenka Sorry, github removed char after "//". I fixed code above, try one more time
@Shakevg This now showing
diptilenka Unfrotantly I don't work with webdriverIO. Could you please post screen from Inspector.exe with the control that has this XPath: @automationId=\"AboutTb\" Why do you use @automationId but not @AutomationId
diptilenka Unfrotantly I don't work with webdriverIO. Could you please post screen from Inspector.exe with the control that has this XPath: @automationId="AboutTb" Why do you use @automationId but not @AutomationId
I post in webdriverIO Gitter channel too, but no response till now. Whether it is automationId or AutomationId, it has same issues.
have you tried with any other locator?
have you tried with any other locator?
e.g ?
The automation id is not there for "about" that is the reason you are getting the error, my bad i missed it, by other i mean by name.
The automation id is not there for "about" that is the reason you are getting the error, my bad i missed it, by other i mean by name.
Tried that too, still no success, does you are having any working repo to try with. Seems like webdriverIO+winappdriver.
Unfortunately I have not worked wedriver.io but may be able to help you over the call
Unfortunately I have not worked wedriver.io but may be able to help you over the call
Thats fine for me, lets meet and try to solve it. how to connect with you ?
Send me a teams invite tomorrow at 8:30 PM IST.
Send me a teams invite tomorrow at 8:30 PM IST.
sure
@anunay1 Can you have time in the morning today :)
No
No
ok on evening 5 PM IST
No only after 8 PM
ok will ping you after 8 PM
@anunay1 are you available now?
@anunay1 are you available now?
yap
Could you please send me the invite ?
Could you please send me the invite ?
sent it to anunayathakur1@gmail.com(it is there in the profile)
check now
Could you please send me the invite ?
sent it to anunayathakur1@gmail.com(it is there in the profile)
Could you please send me the invite ?
sent it to anunayathakur1@gmail.com(it is there in the profile)
Could you please send me the invite ?
sent it to anunayathakur1@gmail.com(it is there in the profile)
Thanks for the help @anunay1 , but still in C# also am unable to get those elements to clickable. :(
What's the error? And what kind of application is it win32, wpf or uwp
Message: Test method designerautomation.UnitTest1.TestMethod1 threw exception: OpenQA.Selenium.WebDriverException: An element could not be located on the page using the given search parameters.
Stack Trace:
RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) RemoteWebDriver.FindElement(String mechanism, String value) AppiumDriver
1.FindElementByXPath(String xpath)
UnitTest1.TestMethod1() line 43
@anunay1 The appp is x64 WPF application running on .NET framework 4.8 it uses MahApps.Metro 1.6.2 for the controls
Can you share the code? That's weird
@anunay1 ` using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenQA.Selenium; using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Windows; using OpenQA.Selenium.Remote; using System; using System.Threading;
namespace designerautomation { [TestClass] public class UnitTest1 {
//Appium Driver URL it works like a windows Service on your PC
private const string appiumDriverURI = "http://127.0.0.1:4723";
//Application Key of your UWA
//U can use any .Exe file as well for open a windows Application
private const string calApp = "XXXXXXXX/Composer.exe";
protected static WindowsDriver<WindowsElement> calSession;
[TestMethod]
public void TestMethod1()
{
if (calSession == null)
{
var appCapabilities = new AppiumOptions();
// DesiredCapabilities appCapabilities = new DesiredCapabilities();
//appCapabilities.SetCapability("app", calApp);
//appCapabilities.SetCapability("platformName", "Windows");
appCapabilities.AddAdditionalCapability("app", calApp);
appCapabilities.AddAdditionalCapability("platformName", "Windows");
//Create a session to intract with Calculator windows application
calSession = new WindowsDriver<WindowsElement>(new Uri(appiumDriverURI), appCapabilities);
Thread.Sleep(15000);
//Automate Button and Get answer from Calculator
//find by Name
// calSession.FindElement(By.XPath("//*[@AutomationId=\"AboutTb\"]")).Click();
//calSession.FindElementByXPath("/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Window\"][@Name=\"Designer\"]/Custom[@AutomationId=\"RecentProjectsDataControl\"]/RadioButton[@AutomationId=\"OpenOther\"]/Text[@ClassName=\"TextBlock\"][@Name=\"Open Other Document\"]").Click();
//calSession.FindElementByName("About").Click();
}
}
}
}
`
Your code is ok can you get the page source.
Your code is ok can you get the page source.
Again i think we need to sit together at night ISt today to have another look ? @anunay1
I have attached my application view for About tab displayed for not using winappdriver with WebdriverIO.
await (await (await $('//*[@automationId=\"AboutTb\"]')).shadow$('//RadioButton[@Name=\"About\"]')).waitForDisplayed();
I have written to detect the About link in my windows custom application, but it always failed to locate the element. Am i doing something wrong.