0

I am trying to automate CRM form page, but when I am trying to find element on the form which is in the form table getting error unable to locate element. Tried several ways but not getting any result.

Below is the code:

By contactPersonIDLink= By.xpath(".//*[@id='gs1_contactpersonid']/table/tbody/tr[3]/td[2]/div[1]");

Below is the image:

enter image description here

SourceCode

enter image description here

Can anyone help me in this, how to locate this element.

Harshal Valanda
  • 5,331
  • 26
  • 63
Aditi Mehta
  • 3
  • 1
  • 5
  • 1
    Can you update the Question with the HTML as text instead of image for further analysis? – undetected Selenium Nov 21 '17 at 05:45
  • The most common problem while automating Dynamics CRM is dealing with iframes. Here's how you [find iframes in browser](https://stackoverflow.com/q/19628121/6205848) and [how to switch to them](https://stackoverflow.com/a/46088844/6205848) after you figure that out – HaC Nov 22 '17 at 03:27
  • Thanks HaC , Yes the problem was with iframe. And when I added switchto iframe it worked. Thanks, for your help. – Aditi Mehta Nov 23 '17 at 05:29

1 Answers1

0

Yes the problem was with iframe. And when I added switchto iframe it worked. Thanks, for your help.

Aditi Mehta
  • 3
  • 1
  • 5