Skip to main content

i'veProblem -

I've been trying to find the correct xpath for a element during 2 days and i. I couldn't get the element in correct manner.

thisObservation -

I observed, It may be due to the element is located inside or under the webcodeframe component. Can anyone help me to interact with the element which is located under frame?

Question - How to interact on element inside frame?

Below I'm sharing html code, for better understanding.

<div class="login-block last">
    <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
    <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
    <table width="290" align="center">
    <tbody>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <th align="right">
        <td align="left">
        <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text">
        </td>
    </tr>
    <tr>
    <tr>
    <tr>
    </tbody>
    </table>

<div class="login-block last">
<form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
<table width="290" align="center">
    <tbody>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <th align="right">
        <td align="left">
    <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text">
    </td>
    </tr>
    <tr>
    <tr>
    <tr>
    </tbody>
    </table>

I tried with the following

by.xpath(//form[@name='frm']//input[@type='text'])//*[@id='rutClient']
//html/body/div[1]/form/table/tbody/tr[7]/td/input/by.id("rutClient")

i've been trying to find the correct xpath for a element during 2 days and i couldn't get the element.

this is the webcode

<div class="login-block last">
    <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
    <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
    <table width="290" align="center">
    <tbody>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <th align="right">
        <td align="left">
        <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text">
        </td>
    </tr>
    <tr>
    <tr>
    <tr>
    </tbody>
    </table>

<div class="login-block last">
<form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
<table width="290" align="center">
    <tbody>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <th align="right">
        <td align="left">
    <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text">
    </td>
    </tr>
    <tr>
    <tr>
    <tr>
    </tbody>
    </table>

I tried with the following

by.xpath(//form[@name='frm']//input[@type='text'])//*[@id='rutClient']
//html/body/div[1]/form/table/tbody/tr[7]/td/input/by.id("rutClient")

Problem -

I've been trying to find the correct xpath for a element. I couldn't get the element in correct manner.

Observation -

I observed, It may be due to the element is located inside or under the frame component. Can anyone help me to interact with the element which is located under frame?

Question - How to interact on element inside frame?

Below I'm sharing html code, for better understanding.

<div class="login-block last">
    <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
    <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
    <table width="290" align="center">
    <tbody>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <th align="right">
        <td align="left">
        <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text">
        </td>
    </tr>
    <tr>
    <tr>
    <tr>
    </tbody>
    </table>

<div class="login-block last">
<form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)">
<table width="290" align="center">
    <tbody>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <tr>
        <th align="right">
        <td align="left">
    <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text">
    </td>
    </tr>
    <tr>
    <tr>
    <tr>
    </tbody>
    </table>

I tried with the following

by.xpath(//form[@name='frm']//input[@type='text'])//*[@id='rutClient']
//html/body/div[1]/form/table/tbody/tr[7]/td/input/by.id("rutClient")

problem finding xpath for a form Java + Selenium + Frame :How to interact on element inside frame?

Post Closed as "Needs details or clarity" by Yu Zhang, IAmMilinPatel, Narendra Chandratre, Kate Paulk, Paul Muir
better format
Link
Yu Zhang
  • 9.9k
  • 5
  • 27
  • 48
better formatting
Source Link
Yu Zhang
  • 9.9k
  • 5
  • 27
  • 48
Loading
better formatting
Source Link
Yu Zhang
  • 9.9k
  • 5
  • 27
  • 48
Loading
deleted 58 characters in body
Source Link
Loading
added 94 characters in body
Source Link
Loading
Source Link
Loading