0

I am working on R. I need to change the tab which is on a website as shown in the image.Image showing the tabs (CDP Profile, AIM)

When I log on to the site, I am by default on CDP Profile. I want to change the tab to AIM using RSelenium. How can I achieve this? The HTML for the above two tabs is as below:

adTabStripTop_Default" style="overflow:hidden;width:1300px;">

<div class="rtsLevel rtsLevel1">
    <ul class="rtsUL rtsScroll">
        <li class="rtsLI rtsFirst">
            <a class="rtsLink rtsSelected rtsHoverBefore" href="#" onclick="return ClearRows('ctl00_ContentBody_searchCDPList_tblSearch','ctl00_ContentBody_searchCDPList_hdnValues');"></a>

::after

<a class="rtsLink rtsAfter" href="#" onclick="return ClearRows('ctl00_ContentBody_searchPDPList_tblSearch','ctl00_ContentBody_searchPDPList_hdnValues');">

                <span class="rtsOut">
                    <span class="rtsIn">
                        <span class="rtsTxt">

                            AIM

                        </span>
                    </span>
                </span>
            </a>
            ::after
        </li>
        ::after
    </ul>
    ::after
</div>
<input id="ctl00_ContentBody_radStripHM_BenchProfiles_ClientState" type="hidden" name="ctl00_ContentBody_radStripHM_BenchProfiles_ClientState" autocomplete="off" value="{"selectedIndexes":["0"],"logEntries":[],"scrollState":{}}"></input>
::after

Kindly let me know if any more inputs are required from my side.Thanks in advance.

Josh O'Brien
  • 159,210
  • 26
  • 366
  • 455
A War
  • 33
  • 2
  • 8
  • Did you try any code? It would be helpful if you attempted to include some sort of [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) where possible solutions could be tested. Show the code you've tried and describe how it fails. – MrFlick May 25 '16 at 15:28
  • @MrFlick I tried this lines: `dt <- remDr$findElement(using = 'tag name',value = "ul") dt$clickElement()` But there is no change in the tabs. – A War May 27 '16 at 08:12

1 Answers1

1

This was achieved using findElement and clickElement. Thanks.

A War
  • 33
  • 2
  • 8