Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere to click on this following object(button), for the values to be displayed in Selenium(Webdriver)?
    text
    copied!<pre><code>&lt;table id="ext-comp-1389" class="x-btn x-btn-text-icon " cellspacing="0" style="width: auto;"&gt; &lt;tbody class="x-btn-small x-btn-icon-small-left"&gt; &lt;tr&gt; &lt;tr&gt; &lt;td class="x-btn-ml"&gt; &lt;td class="x-btn-mc"&gt; &lt;em class="x-btn-split" unselectable="on"&gt; &lt;button id="ext-gen128" class="x-btn-text create" type="button"&gt;New&lt;/button&gt; &lt;/em&gt; &lt;/td&gt; &lt;td class="x-btn-mr"&gt; &lt;i&gt;&amp;nbsp;&lt;/i&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>Above is the way, the New button is present in the HTML file...</p> <p>The behavior of the button is it has a '+' sign present next to it...Only when it is clicked on the '+' sign, does the list of options display....When it is clicked on anywhere else on the button nothing happens...</p> <p>I am trying to automate this, using Selenium Webdriver...And below is the conclusive way in which I am clicking on the button...</p> <pre><code>private static int buttonwidth=24;//value got from firebug computation tab... private static final int Xoffset = (buttonwidth/2)+6; private static final int Yoffset = 0; private static int buttonwidth1=42; private static final int Xoffset1 = (buttonwidth/2)-6; private static final int Yoffset1 = 0; ....... ...... ....... WebElement ele = driver.findElement(By.xpath("//*[@id='ext-gen128']"));//new button's id Actions build = new Actions(driver); build.moveToElement(ele, Xoffset, Yoffset).click().build().perform(); WebElement ele1 = driver.findElement(By.xpath("//*[@id='ext-comp-1389']/tbody/tr[2]/td[2]/em")); Actions build1 = new Actions(driver); build1.moveToElement(ele, Xoffset1, Yoffset1).click().build().perform(); </code></pre> <p>The layout of the buttons are as follows, Width 42 for Em class and 24 for the Button....Snapshots of them as well...</p> <p><img src="https://i.stack.imgur.com/fuI9q.png" alt="Em_Class Layout"></p> <p><img src="https://i.stack.imgur.com/XaoEY.png" alt="NewButton_Layout"></p> <p><img src="https://i.stack.imgur.com/WTfoG.png" alt="New Button Image"></p> <p>Can anyone please help me with this? Which coordinates and object should I target?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload