Missing or invalid type argument for pointer action - Selenium

Sudhir

I am getting below mentioned error message while run program.

Error: Missing or invalid type argument for pointer action.

I am trying to click on sub menu which will display after mouse hover on main menu.

Code below:

public class ActionKeywords {
    WebDriver driver = new FirefoxDriver();

    @Test
    public void openBrowser(){
        driver.get("https://www.levissima.it/");
        driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
        driver.manage().window().maximize();
    }
    @Test
    public void verify_Menus(){

        WebElement mainMenu = driver.findElement(By.xpath("//ul[@id='menu-main']/li/a"));

        WebElement subMenu = driver.findElement(By.xpath("//a[contains(text(),'Impegno Per La Natura')]"));
        Actions action = new Actions (driver);
        action.moveToElement(mainMenu).perform();
        action.click(subMenu).perform();
    }
}

Please assist!

DebanjanB

With Selenium 3.4.0 to work with Mozilla Firefox browser 53.x you need to download the latest geckodriver from here. Save it in your machine & provide the absolute path of the geckodriver. This code executes fine with some simple tweak to your own code.

WebDriver driver;

@BeforeTest
public void setup()
{
    System.setProperty("webdriver.gecko.driver", "C:\\Utility\\BrowserDrivers\\geckodriver.exe");
    DesiredCapabilities dc = DesiredCapabilities.firefox();
    dc.setCapability("marionette", true);
    driver =  new FirefoxDriver(dc);
    driver.manage().window().maximize();
}

@Test
public void openBrowser(){
    driver.get("https://www.levissima.it/");
    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
    driver.manage().window().maximize();
}
@Test
public void verify_Menus(){

    WebElement mainMenu = driver.findElement(By.xpath("//ul[@id='menu-main']/li/a"));

    WebElement subMenu = driver.findElement(By.xpath("//a[contains(text(),'Impegno Per La Natura')]"));
    Actions action = new Actions (driver);
    action.moveToElement(mainMenu).perform();
    action.click(subMenu).perform();
}

The output is:

PASSED: openBrowser
PASSED: verify_Menus

===============================================
    Default test
    Tests run: 2, Failures: 0, Skips: 0
===============================================

Let me know if this answers your question.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

"invalid use of incomplete type" for const function pointer type as template argument

From Dev

"invalid use of incomplete type" for const function pointer type as template argument

From Dev

invalid type argument of ‘->’

From Dev

invalid type argument of '->' C

From Dev

Argument type varchar invalid

From Dev

lua - invalid argument type

From Dev

invalid type argument of '->'

From Dev

invalid 'type' (character) of argument

From Java

Pointer is missing a nullability type specifier

From Dev

Function call missing argument list to create pointer

From Dev

Function call missing argument list to create pointer

From Dev

invalid type argument of ‘->’ (have ‘color’)

From Dev

error: invalid type argument of unary '*'

From Dev

error: invalid type argument of unary '*'

From Dev

passing argument 1 of " " from incompatible pointer type

From Dev

Delegate on a function with an argument being a pointer on a native type

From Dev

"Pointer Expected" and "Conflicting argument type" error in C

From Dev

passing argument 1 of " " from incompatible pointer type

From Dev

Delegate on a function with an argument being a pointer on a native type

From Dev

Invalid use of incomplete type, reference vs pointer

From Dev

Pointer is missing a nullability type specifier on function interface

From Dev

error: invalid type argument of 'unary *' (have 'int')|

From Dev

error: invalid type argument of ‘->’ (have ‘int’)

From Dev

Getting "invalid 'type' (character) of argument" error with aggregate()

From Dev

R: Error says invalid 'type' (character) of argument

From Dev

#define and invalid type argument of unary ‘*’ (have ‘double’)

From Dev

Using Table to Group: invalid 'type' (character) of argument

From Dev

Invalid type argument of '*' (have 'double') C

From Dev

invalid 'envir' argument of type 'closure' in R shiny

Related Related

  1. 1

    "invalid use of incomplete type" for const function pointer type as template argument

  2. 2

    "invalid use of incomplete type" for const function pointer type as template argument

  3. 3

    invalid type argument of ‘->’

  4. 4

    invalid type argument of '->' C

  5. 5

    Argument type varchar invalid

  6. 6

    lua - invalid argument type

  7. 7

    invalid type argument of '->'

  8. 8

    invalid 'type' (character) of argument

  9. 9

    Pointer is missing a nullability type specifier

  10. 10

    Function call missing argument list to create pointer

  11. 11

    Function call missing argument list to create pointer

  12. 12

    invalid type argument of ‘->’ (have ‘color’)

  13. 13

    error: invalid type argument of unary '*'

  14. 14

    error: invalid type argument of unary '*'

  15. 15

    passing argument 1 of " " from incompatible pointer type

  16. 16

    Delegate on a function with an argument being a pointer on a native type

  17. 17

    "Pointer Expected" and "Conflicting argument type" error in C

  18. 18

    passing argument 1 of " " from incompatible pointer type

  19. 19

    Delegate on a function with an argument being a pointer on a native type

  20. 20

    Invalid use of incomplete type, reference vs pointer

  21. 21

    Pointer is missing a nullability type specifier on function interface

  22. 22

    error: invalid type argument of 'unary *' (have 'int')|

  23. 23

    error: invalid type argument of ‘->’ (have ‘int’)

  24. 24

    Getting "invalid 'type' (character) of argument" error with aggregate()

  25. 25

    R: Error says invalid 'type' (character) of argument

  26. 26

    #define and invalid type argument of unary ‘*’ (have ‘double’)

  27. 27

    Using Table to Group: invalid 'type' (character) of argument

  28. 28

    Invalid type argument of '*' (have 'double') C

  29. 29

    invalid 'envir' argument of type 'closure' in R shiny

HotTag

Archive