Closed mpchethan closed 2 years ago
more info # com.arisglobal.LSHE2.StepDefinitions.CaseManagement.NewCase.FULLDATAENTRYFORM.GeneralSteps.setCaseTypeDetails(int) java.lang.reflect.UndeclaredThrowableException at com.sun.proxy.$Proxy22.perform(Unknown Source) at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:656)
Hi @mpchethan , Could you provide the code to create SelfHealingDriver ?
private WebDriver createLocalDriver() throws IOException { if (System.getProperty("BROWSER").equalsIgnoreCase("chrome")) { System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")
"\src\main\resources\com\arisglobal\LSHE2\chromedriver.exe"); ChromeOptions choptions = new ChromeOptions();
LoggingPreferences preferences = new LoggingPreferences();
preferences.enable(LogType.PERFORMANCE, Level.INFO);
preferences.enable(LogType.BROWSER, Level.INFO);
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("download.default_directory", constants.getDownloadPath());
chromePrefs.put("credentials_enable_service", false);
chromePrefs.put("profile.password_manager_enabled", false);
chromePrefs.put("safebrowsing.enabled", true);
if (System.getProperty("openPDFExternally").equalsIgnoreCase("true")) {
chromePrefs.put("plugins.plugins_disabled", new String[] { "Chrome PDF Viewer" });
chromePrefs.put("plugins.always_open_pdf_externally", true);
}
choptions.setExperimentalOption("prefs", chromePrefs);
choptions.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
choptions.setExperimentalOption("useAutomationExtension", false);
choptions.addArguments("--test-type");
choptions.addArguments("--disable-gpu");
choptions.addArguments("--no-first-run");
choptions.addArguments("--no-default-browser-check");
choptions.addArguments("--ignore-certificate-errors");
choptions.setCapability("goog:loggingPrefs", preferences);
if (System.getProperty("EXECUTIONTYPE").equalsIgnoreCase("Headless")) {
choptions.addArguments("--headless");
choptions.addArguments("window-size=1920,1080");
choptions.addArguments("--enable-javascript");
}
//driver = new ChromeDriver(choptions);
WebDriver delegate = new ChromeDriver(choptions);
driver = SelfHealingDriver.create((WebDriver) delegate);
Hi can you please help me to resolve this issue
Hello @mpchethan Try to set properties like in example: hlm.server.url = http://localhost:7878 hlm.imitator.url = http://localhost:8000
Also, in logs I can see that you created RemoteWebDriver but you added the with creating WebDriver. So, what driver do you use in tests?
Same issue after set properties like in example: hlm.server.url = http://localhost:7878/ hlm.imitator.url = http://localhost:8000/ and we are using WebDriver
Could you also provide logs from docker container?
Hi @mpchethan , 'Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element:' means webDriver cannot looking for target locator. There is no such element on the page. Before try to heal element, you have to execute pure tests with will be success. This test data will act as a etalon data to future healing.
Pure test means our test with healenium should pass first and later if any changes in locator. Healenium will heal with new locator.correct me if I’m wrong please
Thanks Chethan
Sent from my iPhone
On 21-Jul-2022, at 3:16 PM, Aliaksei-Ashukha @.***> wrote:
Hi @mpchethan , 'Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element:' means webDriver cannot looking for target locator. There is no such element on the page. Before try to heal element, you have to execute pure tests with will be success. This test data will act as a etalon data to future healing.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
@mpchethan Yes, you are right. You can watch the video: how healenium works: https://youtu.be/Av327EElMCo?t=37
Thank you
Sent from my iPhone
On 21-Jul-2022, at 4:02 PM, Aliaksei-Ashukha @.***> wrote:
Yes, you are right. You can watch the video: how healenium works: https://youtu.be/Av327EElMCo?t=37
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
Describe the bug
when run the getting below error Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 103.0.5060.114, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4..., userDataDir: C:\Users\00005593\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:60337}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:60337/devtoo..., se:cdpVersion: 103.0.5060.114, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true} Session ID: 59e17b407beae85f8ac8de250f71f238 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133) at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:53) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:184) at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:167) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:558) at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:162) at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:60) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:382) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:374) at com.epam.healenium.processor.FindElementProcessor.execute(FindElementProcessor.java:24) at com.epam.healenium.processor.BaseProcessor.process(BaseProcessor.java:41) at com.epam.healenium.handlers.proxy.BaseHandler.findElement(BaseHandler.java:58) at com.epam.healenium.handlers.proxy.SelfHealingProxyInvocationHandler.invoke(SelfHealingProxyInvocationHandler.java:39) at com.sun.proxy.$Proxy22.findElement(Unknown Source) at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:70) at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:39) at com.sun.proxy.$Proxy29.getWrappedElement(Unknown Source) at org.openqa.selenium.interactions.PointerInput$Origin.asArg(PointerInput.java:206) at org.openqa.selenium.interactions.PointerInput$Move.encode(PointerInput.java:157) at org.openqa.selenium.interactions.Sequence.encode(Sequence.java:73) at org.openqa.selenium.interactions.Sequence.toJson(Sequence.java:82)
How to reproduce the issue
Logs appeared during using Healenium
Expected behavior
No response
Actual behavior
No response
Healenium Web version
3.2.5
Healenium Backend version
3.2.2
Selenium version
4.1.2
Platform
java
Properties file
recovery-tries=1 score-cap=.2 heal-enabled=true serverHost = localhost serverPort = 7878
Additional context
No response