How to type in textbox using Selenium WebDriver (Selenium 2) with Java?

后端 未结 6 2121
栀梦
栀梦 2021-01-04 10:18

\"enter I am using Selenium 2. But after running following code, i could not

6条回答
  •  -上瘾入骨i
    2021-01-04 10:33

    You should replace WebDriver wb = new FirefoxDriver(); with driver = new FirefoxDriver(); in your @Before Annotation.

    As you are accessing driver object with null or you can make wb reference variable as global variable.

提交回复
热议问题