Asked  7 Months ago    Answers:  5   Viewed   31 times

While finding the relative XPath via Firebug : it creates like

  1. .//*[@id='Passwd']--------- what if we dont use dot at the start what it signifies?

  2. Just add //* in the Xpath -- it highlights --- various page elements ---------- what does it signify?

Below are XPaths for Gmail password fields. What is significance of * ?

  • .//*[@id='Passwd']

  • //child::input[@type='password']



These expressions all select different nodesets:


The '.' at the beginning means, that the current processing starts at the current node. The '*' selects all element nodes descending from this current node with the @id-attribute-value equal to 'Passwd'.

What if we don't use dot at the start what it signifies?

Then you'd select all element nodes with an @id-attribute-value equal to 'Passwd' in the whole document.

Just add //* in the XPath -- it highlights --- various page elements

This would select all element nodes in the whole document.

Below mentioned : XPatht's for Gmail Password field are true what is significance of * ?


This would select all element nodes descending from the current node which @id-attribute-value is equal to 'Passwd'.


This would select all child-element nodes named input which @type-attribute-values are equal to 'password'. The child:: axis prefix may be omitted, because it is the default behaviour.

The syntax of choosing the appropriate expression is explained here at

And the Axes(current point in processing) are explained here at another page.

Tuesday, June 1, 2021
answered 7 Months ago

If you want to re-draw your view from the UI thread you can call invalidate() method.

If you want to re-draw your view from a non-UI thread you can call postInvalidate() method.

Each class which is derived from the View class has the invalidate and the postInvalidate method. If invalidate gets called it tells the system that the current view has changed and it should be redrawn as soon as possible. As this method can only be called from your UI thread another method is needed for when you are not in the UI thread and still want to notify the system that your View has been changed. The postInvalidate method notifies the system from a non-UI thread and the view gets redrawn in the next event loop on the UI thread as soon as possible. It is also shortly explained in the SDK documentation:



There are some problems that arise when using postInvalidate from other threads (like not having the UI updated right-away), this will be more efficient:

runOnUiThread(new Runnable() {
    public void run() {
Monday, August 9, 2021
answered 4 Months ago

There is essentially no difference, only a TextView has the width property also.


Sunday, August 22, 2021
answered 4 Months ago

As per your statement I would want not to have value in executeScript, but java variable you can reference the Sting value through a Java variable :

String myValue = "80120804076";
WebElement pesel = driver.findElement(fldPesel);
jse.executeScript("arguments[0].value='" + myValue + "';", pesel);
Monday, August 30, 2021
answered 4 Months ago

I had the same problem and I was able to solve it by using the robot, creating function for the url and passing it to a different thread.

    Runnable mlauncher = () -> {
    try {

     } catch (Exception e) {

public void myfunction {
 try {

   Thread mthread = new Thread(mlauncher);


 } catch (Exception e) {
Tuesday, September 28, 2021
answered 3 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :