selenium-google-code-issue-archive icon indicating copy to clipboard operation
selenium-google-code-issue-archive copied to clipboard

Webdriver Firefox Exception : org.openqa.selenium.WebDriverException: Permission denied to access property '__qosId'

Open lukeis opened this issue 9 years ago • 16 comments

Originally reported on Google Code with ID 7588

I was trying to automate mail sending in Microsoft Outlook/Hotmail, Firefox Webdriver
works fine till login after that its constantly throwing exception org.openqa.selenium.WebDriverException:
Permission denied to access property '__qosId'. I tried clicking on other elements
but its throwing same exception. I clicked on compose (New) button using Jscript but
after that the same exception is thrown when i try to click other elements.

What steps will reproduce the problem?
1.Just try simple mail read event in Microsoft Outlook/Hotmail
2.
3.

What is the expected output? What do you see instead?
It Should Click and execute without exceptions. 

Selenium version:2.42.0
Jave: 1.7
OS:Windows 7
Browser:Firefox
Browser version:27,28,29,30

Note:- I tried with Firefox version 27,28 & 30. Initially i was trying with Firefox
30 then tried with 28 & 27 but still the same exception. Internet Explorer and Google
Chrome are working fine with same code.
I have attached the Stack trace.

Reported by ravikumar.hawaldar on 2014-07-09 07:05:58


- _Attachment: [StackTraceHotMail.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-7588/comment-0/StackTraceHotMail.txt)_

lukeis avatar Mar 04 '16 08:03 lukeis

Please provide a complete executable scenario and a sample page to reproduce the issue.

Reported by barancev on 2014-07-09 07:16:09

  • Status changed: NeedsClarification
  • Labels added: Browser-Firefox

lukeis avatar Mar 04 '16 08:03 lukeis

Step 1 - I am getting outlook page through driver.get("https://www.outlook.com")
Step 2 - I am Entering Username And Password through sendKeys
Step 3 - Clicking Login Button. Login Completes
Step 4 - I am trying to Click Compose/new button 
         Here I am getting that exception.. I tried clicking on other elements but
same exception is thrown. I Clicked Compose button with Jscript it clicked but as i
try to enter To email address with sendKeys again same exception is thrown. My Code
Works Fine With Latest Versions Of IE and Chrome. I am Attaching my code please have
a look and help me out.              

Reported by ravikumar.hawaldar on 2014-07-09 11:29:09

lukeis avatar Mar 04 '16 08:03 lukeis

Reported by ravikumar.hawaldar on 2014-07-09 11:30:10


- _Attachment: [CodeFFHotMail.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-7588/comment-3/CodeFFHotMail.txt)_

lukeis avatar Mar 04 '16 08:03 lukeis

Reproduced

Reported by barancev on 2014-07-11 10:50:08

  • Status changed: Accepted
  • Labels removed: Status-Untriaged

lukeis avatar Mar 04 '16 08:03 lukeis

Any Workaround.. I am still stuck with the issue..

Reported by ravikumar.hawaldar on 2014-07-15 06:37:24

lukeis avatar Mar 04 '16 08:03 lukeis

We're working on this. The problem is that the target site overrides standard functions
addEventListener and removeEventListener, and this causes collision with Selenium.
If web designers were not so careless...

Reported by barancev on 2014-07-15 08:06:24

lukeis avatar Mar 04 '16 08:03 lukeis

There is a workaround: 1) use native events, 2) set off 'Qos':

    DesiredCapabilities caps = new DesiredCapabilities();
    // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    caps.setCapability(CapabilityType.HAS_NATIVE_EVENTS, false);
    // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    FirefoxDriver driver = new FirefoxDriver(caps);
    driver.manage().window().maximize();
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

    driver.get("https://www.outlook.com");
    Thread.sleep(5000);
    driver.findElement(By.xpath("//div[@id='idDiv_PWD_UsernameTb']//input")).sendKeys("[email protected]");
    Thread.sleep(1000);
    driver.findElement(By.xpath("//div[@id='idDiv_PWD_PasswordTb']//input")).sendKeys("mic001ddd");
    Thread.sleep(1000);
    // Clicking On Login Button
    driver.findElement(By.id("idSIButton9")).click();
    Thread.sleep(30000);
    // From Here I am Getting Exception When I Try To Click Compose Button

    // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    driver.executeScript("Qos.isEnabled = false;");
    // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    // Clicking On Compose Button
    driver.findElement(By.xpath("//a[@id='NewMessage']")).click(); 

It is unclear yet why it does not work with native events enabled.

Reported by barancev on 2014-07-15 11:17:03

lukeis avatar Mar 04 '16 08:03 lukeis

Sorry for late reply, Still the same exception is thrown.. please explain the following
code
1)caps.setCapability(CapabilityType.HAS_NATIVE_EVENTS, false);
2)driver.executeScript("Qos.isEnabled = false;");
What these will do? And when i directly pasted the code it gave error the method is
undefined for type webdriver, for this line it gave error
driver.executeScript("Qos.isEnabled = false;");
So i edited it like this 
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("Qos.isEnabled = false;");
Is this the correct way? Thank You for your help.

Reported by ravikumar.hawaldar on 2014-07-16 06:46:21

lukeis avatar Mar 04 '16 08:03 lukeis

> So i edited it like this 
> JavascriptExecutor executor = (JavascriptExecutor)driver;
> executor.executeScript("Qos.isEnabled = false;");
> Is this the correct way?

Yes, it is correct.

Do you have "the same exception" on the same operation driver.findElement(By.xpath("//a[@id='NewMessage']"))
or in another location?

Reported by barancev on 2014-07-16 19:35:50

lukeis avatar Mar 04 '16 08:03 lukeis

yeah on the same operation its throwing same exception..

Reported by ravikumar.hawaldar on 2014-07-17 05:23:40

lukeis avatar Mar 04 '16 08:03 lukeis

Any update on the issue????

Reported by ravikumar.hawaldar on 2014-08-04 10:09:45

lukeis avatar Mar 04 '16 08:03 lukeis

https://code.google.com/p/selenium/issues/detail?id=7931

Is this related to this issue? It is throwing a similar error. Thanks for any help.

Reported by [email protected] on 2014-09-18 16:00:57

lukeis avatar Mar 04 '16 08:03 lukeis

I don't think so.. this error was thrown for every click event using click() method...
Meanwhile you can try with other locators this may help..

Reported by ravikumar.hawaldar on 2014-09-26 05:33:09

lukeis avatar Mar 04 '16 08:03 lukeis

[email protected]

Reported by daisy.di.2006 on 2015-04-20 15:53:23

lukeis avatar Mar 04 '16 08:03 lukeis

I'm hoping that this item will get some updates soon.  Meanwhile, I'm using the following
to perform actions in Outlook:

JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("document.getElementsByClassName('TextSemiBold t_estc t_elnk')[0].click();");

Reported by mmasikip16 on 2015-08-03 00:38:27

lukeis avatar Mar 04 '16 08:03 lukeis

Reported by luke.semerau on 2015-09-17 17:47:03

  • Labels added: Restrict-AddIssueComment-Commit

lukeis avatar Mar 04 '16 08:03 lukeis