I got my code ready in Selenium IDE and exported it to Selenium Webdriver (JUnit 4). My code was working perfectly in Selenium IDE but an issue has arose after my migration to Selenium Webdriver.
The issue is on a click!
In Selenium IDE
Command: Click Target: id=vdc_div2
In Selenium Webdriver
All the other clicks in Selenium Webdriver are working apart this. It doesn't find this element and gives a
NoSuchElementException: Unable to locate element. I have also tried different locators, such as xpath and css.
The html for this is as follows.
<div id="pmc_vdc_items" class="row clearfix pmc-row"> <div id="vdc_div0" class="pmc-selection-tile-large"> <div id="vdc_div1" class="pmc-selection-tile-large"> <div id="vdc_div2" class="pmc-selection-tile-large pmc-selection-tile-large- active"> <div id="vdc_div3" class="pmc-selection-tile-large"> </div>
Please help me out.