Get full text based on partial text in cefsharp wpf - wpf

In my xml I have a cefsharp browser:
<cefsharpwpf:ChromiumWebBrowser LoadingStateChanged="browser_LoadingStateChanged" IsBrowserInitializedChanged="browser_IsBrowserInitializedChanged" x:Name="browser" Margin="0,0,0,-384.2"></cefsharpwpf:ChromiumWebBrowser>
In my c# I have a LoadingStateChanged which determines what site cefsharp is on. I tell cefsharp to go to the google login page where the user can then type in their google login information to be logged into google. When they are logged in, I want to be able to get their username from the google home page:
The part which says Welcome, {User Name}, I would like to get the text which is {User Name} but it doesn't have a specific value so I would have to look it up from the Welcome part. I have tried to search it up but I have found no answers. There is a .Find() but it doesn't work that way. Any help would be appreciated!

It looks like cefsharp browser has a method to get the page's HTML:
https://cefsharp.github.io/api/51.0.0/html/M_CefSharp_WebBrowserExtensions_GetSourceAsync.htm
You could try getting the HTML of the page after it loads, search for the Welcome string within it, and extract the part containing the name.

Related

How to change title of google search list title

In this image you can see the result of codevaly it's show with my web title but i changed the title of my website to "codevaly" but still it return "my web", please help me to fix it
Click To View Image
It is my html file of react js project
Click To View Image
Now, Please point out my mistake.
Next time, insert your code and your problem in text. Pictures are frowned upon on Stackoverflow. Have you changed the title recently? If so, you might just need to wait for a google crawler to visit your page again.
More info can be found in the google search docs. Some other thing could improve the title, such as including an H1 element on your page that repeats the name.
It looks like your title and description both are not updated.
There are two possibilities for this
You have not deployed the recent code in production.
If not the first case then wait for google to crawl through your page.
Try checking with this site:Your site URL to list out all the links in your web app.
Thanks.

Wagtail: How to use wagtailuserbar for moderation (approving and rejecting draft posts)

We are using the wagtailuserbar templatetag on our site and it works fine for published pages. We get the "Edit this page" and "View in admin" options etc.
The documentation says that wagtailuserbar can also be used by moderators to approve/reject drafts but I can't get this work.
Quote from the documentation:
Moderators are also given the ability to accept or reject a page being previewed as part of content moderation.
This screenshot shows the admin website with a page that has been submitted for moderation:
Clicking the preview link opens a new tab but the wagtail userbar is not visible.
If one instead uses the View Draft feature in the page explorer then again, new tab but no userbar.
Looking at the source code here these lines seem to remove the userbar for any preview view:
# Don't render if this is a preview. Since some routes can render the userbar without going through Page.serve(),
# request.is_preview might not be defined.
if getattr(request, 'is_preview', False):
return ''
My question is:
How can I use the wagtail userbar to approve or reject previews of pages submitted for moderation? The documentation suggests this is possible but experience and my understanding of the code suggests not.
It's a feature I'd really love to use.
Thanks for any help.
Thanks for this very clear description of the problem. I think this is a bug, which I've raised here:
https://github.com/wagtail/wagtail/issues/6008

Not able to pull blog image in linkedin

I'm implementing custom share buttons for LinkedIn, Facebook etc. using Drupal 7 at the following URL:
http://commandpartners.com/blog/5-traits-of-an-entrepreneurial-mindset
After a user clicks on the LinkedIn button, a LinkedIn popup opens, with the correct title and description. However, the wrong image appears. I'm not able to understand why the correct blog image does not appear.
Where is LinkedIn pulling the image from?
It looks like maybe the image being used is an older image capture from your site. Did you have this older image on the site before? (the city skyline illustration)

how to make google web page tree view in google search?

I'm looking for a code that Google or yahoo or bing or ... will automatically show web page tree view.
tree view of website it depends on sitemap, so, how can we set that Google will show website tree in Google search result, something like contact us page and other pages will appear in down of domain name that user will be able to click on those tree view links.
I really appropriate for your posts and comments about this issue.
Regards
It's not totally up to you, Google will decide when and if they are going to show that and it's only for the top result. You should add your site to Webmasters Tools and you can read more about Sitelinks.

Salesfroce-Vimeo how to connect via oauth?

I want to embed vimeo videos in my Vf page. I am trying to embed this with the link but it says access denied. Means it needs and authorization.
Can any body please suggest me how to d this.
Sounds like the video isn't public? I'd have thought your real problem is some settings on Vimeo — I highly doubt you want your users to create accounts / login to Vimeo, and doubt you really need to store credentials for your own account either.
I've just created a public sites page to show that if the Vimeo settings are set up right that it can be embedded without a login.
The entire page code is below, note I had to add ="true" to the various full screen attributes in order for Salesforce to save the file correctly.
<apex:page >
<iframe src="http://player.vimeo.com/video/38991709?title=0&byline=0&portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScree="true" mozallowfullscreen="true" allowFullScreen="true"></iframe>
<p>
ANGRY BEARD from TKSH! Films & Stop Motion on Vimeo.
</p>
</apex:page>
The video is not mine, it's just one I found on the Vimeo home page a moment ago

Resources