0

I'm trying to click a div heading but having some difficulty, below is the CSS

html body#RuntimeFormBody form#Form1 div#tblContainer div#Content div#ContainerCell div#ContainerSizeGuide div.WebControl.ctTabbedFolder.ControlViewportDESKTOP div#TabbedFolder1 div.contentholder span#TabbedFolder1Page1.TabHL.TabSelected div a

the code is just to click the above so I don't think I need to supply that as it won't really help.

I have got help for something similar which was

html body.CommunityBody form#Form1 div.MainCommunityTable.MobileLayoutBlock div div div.NarrowCommunity span.AddinSpan div.AddIn.atScreens.AddInViewportDESKTOP.AddInDisplayBLOCK div#AddInMyQuickLinks.AddInCollapsible.ui-accordion.ui-widget.ui-helper-reset div#ui-accordion-AddInMyQuickLinks-panel-0.AddInMain.ui-accordion-content.ui-helper-reset.ui-widget-content.ui-corner-bottom.ui-accordion-content-active span ul.NoIndent li.NoBullet.jms-bullet h3 a img

And the solution was below.

@FindBy(css = "li:nth-child(1).NoBullet.jms-bullet> h3>a[href^='javascript:ShowSelectedAddInScreen']")

So I am looking for a similar solution.

Thanks in advance for your assistance! :)

adding HTML

<img width="15" border="0" align="ABSMIDDLE" alt="Click to edit Payroll Company" onkeydown="xCode=String.fromCharCode(event.keyCode).charCodeAt(0);if (xCode == 32){$(this).click()};" onclick="$HRnet('PAYROLLCOMPANY1').lookupID='db775dbd-f0c4-4c15-9280-d8e881a728c0';$HRnet('PAYROLLCOMPANY1').screenID='00000000-0000-0000-0000-000000000000';$HRnet('PAYROLLCOMPANY1').caption='Select Lookup Value - Payroll Company';$HRnet('PAYROLLCOMPANY1').filterControl=0;$HRnet('PAYROLLCOMPANY1').filterFieldType='0';$HRnet('PAYROLLCOMPANY1').filterFieldCaption='';$HRnet('PAYROLLCOMPANY1').filterValueDataView='00000000-0000-0000-0000-000000000000';$HRnet('PAYROLLCOMPANY1').filterValueTable='';$HRnet('PAYROLLCOMPANY1').filterValueField='';$HRnet('PAYROLLCOMPANY1').filterFieldOnScreen='False';$HRnet('PAYROLLCOMPANY1').isChangesMade='TRUE';$HRnet('PAYROLLCOMPANY1').currentRecordID='00000000-0000-0000-0000-000000000000';if ($HRnet('PAYROLLCOMPANY1').filterBySystemFieldValue==undefined) $HRnet('PAYROLLCOMPANY1').filterBySystemFieldValue='';$HRnet('PAYROLLCOMPANY1').impersonationId='';$HRnet('PAYROLLCOMPANY1').impersonationToken='';$HRnet('PAYROLLCOMPANY1').show();" style="POSITION:RELATIVE;TOP:0px;LEFT:2px;cursor:pointer;" tabindex="1" title="Click to edit Payroll Company" src="/V14_ST1/Application/Images/btnLookup.png">

1 Answer 1

1

It should be just

By.cssSelector("#TabbedFolder1Page1 div a")

I'm not used to reading CSS like you have it posted. I don't know where that came from. The HTML would be more useful (for me, at least). You may be able to use the below to be more specific.

By.cssSelector("#TabbedFolder1Page1 > div > a")
Sign up to request clarification or add additional context in comments.

1 Comment

Hi I've add html, but I'll try your suggestion above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.