Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

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">
share|improve this question
up vote 1 down vote accepted

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")
share|improve this answer
    
Hi I've add html, but I'll try your suggestion above. – OhAye Jul 7 at 10:50
    
Thanks for your help, that worked. – OhAye Jul 7 at 10:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.