Please support identifying the Xpath for click in circles

Hi,

I try several ways to get the Xpath to identify circles in chart but without success. Could you please support me?
I try without sucess:
//div[starts-with(@id,“cemboard-composite-chart-510581”)]/[local-name()=“svg”]/[local-name()=“g”][1]/[local-name()=“g”][1]/[local-name()=“g”][5]/*[local-name()=“circle”]

Inspect code:

  • cemboard-composite-chart-510581

    Index Range 0 - 9 10 - 19 20 - 29 30 - 39 40 - 49 50 - 59 60 - 69 70 - 79 80 - 89 90 - 99 100 0 500 1k 1.5k 2k 2.5k 3k Subscribers
  • I find 2 points of doubt.

    1. the id value ends with 510581 — isn’t it dynamic? It may change every time you open the page, doesn’t it? If it is dynamic you should exclude the dynamic portion, so write
    //div[starts-with(@id,"cemboard-composite-chart-")]
    
    1. /[local-name()="svg"] is wrong as XPath fragment. It should rather be
      /*[local-name()="svg"]

    Hi Kazurayam,

    Thanks for your reply. In fact I want to click on all circle elements available but not visible. Only visible when hoover mouse. I tried several commands but nothing works.
    I already try to click on circle 1 : using below commands:
    WebUI.mouseOver(findTestObject(‘Page_CEI-Comparison Customer Experience Ma_b303c8/circle’))

    WebUI.click(findTestObject(‘Page_CEI-Comparison Customer Experience Ma_b303c8/circle’))

    xPath: //div[starts-with(@id,“cemboard-composite-chart-”)]/[local-name()=“svg”]/[local-name()=“g”][1]/[local-name()=“g”][1]/[local-name()=“g”][5]/*[local-name()=“circle”][1]

    but returns error:
    <<
    Unable to find the element located by ‘By.xpath: //div[starts-with(@id,“cemboard-composite-chart-”)]/[local-name()=“svg”]/[local-name()=“g”][1]/[local-name()=“g”][1]/[local-name()=“g”][5]/*[local-name()=“circle”]’. Please recheck the objects properties to make sure the desired element is located.

    from console:
    020-03-02 11:17:11.426 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to move mouse over object ‘Object Repository/Page_CEI-Comparison Customer Experience Ma_b303c8/circle’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to move mouse over object ‘Object Repository/Page_CEI-Comparison Customer Experience Ma_b303c8/circle’
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:776)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$6.call(Unknown Source)
    at CEI_COMPARISON- DEFAULT.run(CEI_COMPARISON- DEFAULT:61)
    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
    at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
    at TempTestCase1583147699696.run(TempTestCase1583147699696.groovy:23)
    Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_CEI-Comparison Customer Experience Ma_b303c8/circle’ located by ‘By.xpath: //div[starts-with(@id,“cemboard-composite-chart-”)]/[local-name()=“svg”]/[local-name()=“g”][1]/[local-name()=“g”][1]/[local-name()=“g”][5]/[local-name()=“circle”]’ not found
    at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1154)
    at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
    at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.doCall(MouseOverKeyword.groovy:54)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.call(MouseOverKeyword.groovy)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:776)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$6.call(Unknown Source)
    at Script1582991694980.run(Script1582991694980.groovy:61)
    … 11 more
    )
    2020-03-02 11:17:11.432 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/CEI_COMPARISON- DEFAULT FAILED.
    Reason:
    com.kms.katalon.core.exception.StepFailedException: Unable to move mouse over object ‘Object Repository/Page_CEI-Comparison Customer Experience Ma_b303c8/circle’
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.mouseOver(MouseOverKeyword.groovy:66)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword.execute(MouseOverKeyword.groovy:40)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.mouseOver(WebUiBuiltInKeywords.groovy:776)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$mouseOver$6.call(Unknown Source)
    at CEI_COMPARISON- DEFAULT.run(CEI_COMPARISON- DEFAULT:61)
    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
    at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
    at TempTestCase1583147699696.run(TempTestCase1583147699696.groovy:23)
    Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_CEI-Comparison Customer Experience Ma_b303c8/circle’ located by 'By.xpath: //div[starts-with(@id,“cemboard-composite-chart-”)]/
    [local-name()=“svg”]/[local-name()=“g”][1]/[local-name()=“g”][1]/[local-name()=“g”][5]/[local-name()=“circle”]’ not found
    at com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement(WebUiCommonHelper.java:1154)
    at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:27)
    at com.kms.katalon.core.webui.keyword.internal.WebUIAbstractKeyword.findWebElement(WebUIAbstractKeyword.groovy:26)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.doCall(MouseOverKeyword.groovy:54)
    at com.kms.katalon.core.webui.keyword.builtin.MouseOverKeyword$_mouseOver_closure1.call(MouseOverKeyword.groovy)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
    … 17 more

    2020-03-02 11:17:11.455 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/CEI_COMPARISON- DEFAULT
    2020-03-02 11:17:11.461 INFO c.k.katalon.core.main.TestCaseExecutor - =================== Smart XPath Report =======================
    2020-03-02 11:17:11.463 INFO c.k.katalon.core.main.TestCaseExecutor - Refer to the link below to preview and approve auto healing on broken test objects.
    2020-03-02 11:17:11.463 INFO c.k.katalon.core.main.TestCaseExecutor - https://docs.katalon.com/katalon-studio/docs/auto-healing-smart-xpath.html
    2020-03-02 11:17:11.464 INFO c.k.katalon.core.main.TestCaseExecutor - ===============================================================
    ERROR LOG:

    !SESSION 2020-02-29 15:28:01.061 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.8.0_181
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault

    This is a continuation of log file C:\Program Files (x86)\Katalon_Studio_Windows_64-7.2.1\config.metadata.bak_7.log
    Created Time: 2020-03-02 11:17:53.856

    !ENTRY org.eclipse.e4.ui.workbench 4 0 2020-03-02 11:17:53.857
    !MESSAGE
    !STACK 0
    org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:4533)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.SWT.error(SWT.java:4419)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:354)
    at org.eclipse.swt.widgets.Tree.getItems(Tree.java:3304)
    at org.eclipse.jface.viewers.TreeViewer.getChildren(TreeViewer.java:160)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalCollectExpandedItems(AbstractTreeViewer.java:1593)
    at org.eclipse.jface.viewers.AbstractTreeViewer.getExpandedElements(AbstractTreeViewer.java:1193)
    at com.kms.katalon.composer.project.handlers.ProjectSessionHandler.rememberExpandedTreeEntities(ProjectSessionHandler.java:194)
    at com.kms.katalon.composer.project.handlers.ProjectSessionHandler.access$0(ProjectSessionHandler.java:189)
    at com.kms.katalon.composer.project.handlers.ProjectSessionHandler$1.handleEvent(ProjectSessionHandler.java:82)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94)
    at com.kms.katalon.composer.project.handlers.CloseProjectHandler$1.handleEvent(CloseProjectHandler.java:55)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94)
    at com.kms.katalon.core.application.ApplicationStaupHandler.lambda$5(ApplicationStaupHandler.java:95)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:165)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:369)
    at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:481)
    at com.kms.katalon.composer.components.impl.installer.InstallationManager.startInstallation(InstallationManager.java:54)
    at com.kms.katalon.composer.handlers.UpdateChromeWebdriverHandler.execute(UpdateChromeWebdriverHandler.java:47)
    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.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at com.kms.katalon.core.application.Application.internalRunGUI(Application.java:173)
    at com.kms.katalon.core.application.Application.runGUI(Application.java:163)
    at com.kms.katalon.core.application.Application.start(Application.java:82)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
    All launchers terminated

    !ENTRY org.eclipse.equinox.event 4 0 2020-03-02 11:17:53.861
    !MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=PROJECT/CLOSE] {} to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@24f28b10
    !STACK 0
    java.lang.NullPointerException

    ======================================================
    Sent you the html of chart:
    new 8.txt (8.9 KB)

    I read a lot of posts but without success. Do you know how can I manage to get click in the circles?

    I have no idea.
    A lot of experiments need to be done.
    Is your Application Under Test publicly accessible through Internet?

    I can’t help you with XPath. If you use CSS instead, you can select the three circle elements shown in your HTML using these three CSS selectors:

    li[data-col=5][data-row=14] circle:nth-child(1)
    li[data-col=5][data-row=14] circle:nth-child(2)
    li[data-col=5][data-row=14] circle:nth-child(3)
    

    If you want to, you can probably parameterize those selectors but if your list of circles is known at the time you write the test, there is no need.

    Hi,

    The XPATH is ok. Already test it. The issue I’m facing is to mouse over an element not visible. I need to know how to make all elements visible to make possible to mouse over. By default circles are not visible, only when the mouse is hover. Do you know how can I make visible all elements in this chart?

    I think both @kazurayam and I have answered your questions but now you are asking a different question. Also, @kazurayam asked you a question but you did not answer him.

    I am not sure your last question will help you resolve your problem. What I would like you to do is describe what happens when a human user uses the SVG elements. Then we can see how best to automate it using Katalon/Selenium.

    Hi,

    I can’t send you the link because this is a product only works for specific nw.
    Im trying to figure out if I can automate all product using Katalon. Currently we have few charts (already sent a part of html) that will make visible circles only when mouse is hover. This part of code is hide and will only be visible with mouse hover.
    I want to simulate the same using Katalon, I have the xpath but mouse over and click doesn’t work. I think the problem is because circle style=“display: none;”.
    Below part of html only appears in portal when mouse is hover:

    										<circle cx="224.455" cy="386.155" r="6" stroke="#fff" stroke-width="2" stroke-opacity="1" fill="#00c9ff" fill-opacity="1" style="display: none;"/>
    										<circle cx="316.091" cy="315.336" r="6" stroke="#fff" stroke-width="2" stroke-opacity="1" fill="#00c9ff" fill-opacity="1" style="display: none;"/>
    

    But per default isn’t present. How can I make all the time this visible to move on with automation? see attach txt

    new 9.txt (8.8 KB)

    HTML does not make things visible or invisible – CSS is what is at the root of this trickery. The circles may become visible when you hover over the correct parent element in the HTML. Without seeing the HTML in situ from the DevTools (in Firefox) it’s hard to say what you need to hover over. You certainly cannot hover over an element which has the CSS style display:none.

    To be clear: Right now you have ONE problem: Identify the single element that, when hovered, displays the circles. If a human can do this, automation can do this too.

    Don’t get distracted. Solve that one problem first. Show me the HTML from the DOM in the browser using DevTools (Firefox).

    Im using chrome. I’ve sent you the part of html I took from F12. What part should I take? sorry but Im a bit confused. however I send you new info.

    This is the HTML page:
    CEI-Comparison _ Customer Experience Management on Demand.html (564.8 KB)

    new 10.txt (7.6 KB)

    Hi Russ,

    Case its ok for you, we can do a webex and I can show to you. I just need your email.

    Yes, I know. I asked you to use Firefox for a reason. But I see I wasn’t clear…

    I need to see screenshots. I am interested in seeing which elements have events attached to them. This information is not available in Chrome. To show you an example, here is a screenshot of this forum page, showing there are events attached to elements on the page:

    In your case, you would want to investigate which parent elements cause the circles to appear when you hover the mouse over them. Then click on the event like I did in my image.

    That looks promising. Look at all those mouse event handlers :slight_smile:

    Now you have the task of compiling a set of test steps to automate the mouse into the correct position to cause the circles to appear. You can use WebUI.mouseOverOffset() to transition the mouse to any given x, y coordinate within the target element.

    If that fails, you can also try the Selenium Actions API:

    https://www.selenium.dev/selenium/docs/api/dotnet/html/T_OpenQA_Selenium_Interactions_Actions.htm

    If you choose to use the Actions API and to give you a head start, here are a couple of methods I used in the past – this is unmaintained code, no longer in use so treat it with caution. I also will not be able to debug this locally since it belongs to a system I no longer test against. In other words, it’s just a hint at what your code might look like.

      /**
       * Hover over an element.
       * @param selector (String) CSS selector for the element.
       */
      static void Se_hover(String selector) {
        WebDriver driver = DriverFactory.getWebDriver()
        WebElement elem = driver.findElement(By.cssSelector(selector))
        WebUI.executeJavaScript('arguments[0].scrollIntoView(true)', Arrays.asList(elem))
        Actions act = new Actions(driver)
        act.moveToElement(elem).build().perform()
      }
    
      /**
       * Hover over an element then click it.
       * @param selector (String) CSS selector for the element.
       */
      static void Se_hoverClick(String selector) {
        WebDriver driver = DriverFactory.getWebDriver()
        WebElement elem = driver.findElement(By.cssSelector(selector))
        WebUI.executeJavaScript('arguments[0].scrollIntoView(true)', Arrays.asList(elem))
        Actions act = new Actions(driver)
        act.moveToElement(elem).click(elem).build().perform()
      }
    

    If everything fails, you my not have found the correct parent element that is handling the mouse for the operations in the SVG area. Keep looking.

    Let me know how you get on.